1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Plug some memory leaks in NUT muxer and demuxer

Originally committed as revision 22120 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Vitor Sessak 2010-02-28 20:49:21 +00:00
parent fee6faa2b6
commit 27dbc47c05
2 changed files with 7 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;
}