Commit 27dbc47c authored by Vitor Sessak's avatar Vitor Sessak

Plug some memory leaks in NUT muxer and demuxer

Originally committed as revision 22120 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent fee6faa2
......@@ -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