Commit 5d643640 authored by vitor's avatar vitor

Plug some memory leaks in NUT muxer and demuxer


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22120 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 77d5cd31
......@@ -897,9 +897,13 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t pts, int flag
static int nut_read_close(AVFormatContext *s)
{
NUTContext *nut = s->priv_data;
int i;
av_freep(&nut->time_base);
av_freep(&nut->stream);
av_tree_destroy_free_elem(nut->syncpoints);
for(i = 1; i < nut->header_count; i++)
av_freep(&nut->header[i]);
return 0;
}
......
......@@ -797,6 +797,9 @@ static int write_trailer(AVFormatContext *s){
while(nut->header_count<3)
write_headers(nut, bc);
put_flush_packet(bc);
av_freep(&nut->stream);
av_freep(&nut->time_base);
av_tree_destroy_free_elem(nut->syncpoints);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment