diff options
author | Jindřich Makovička <makovick@gmail.com> | 2009-02-06 20:30:18 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-02-06 20:30:18 +0000 |
commit | dcd913d9ed6c15ea53882894baa343695575abcd (patch) | |
tree | 1bd1e972485cfd386934e99e6446b09d2cfd5971 /libavformat | |
parent | 17a5894a23147e328ca3268bf00b068a9ee2c826 (diff) | |
download | ffmpeg-dcd913d9ed6c15ea53882894baa343695575abcd.tar.gz |
Fix minor memory leak.
Patch by Jindrich Makovicka, approved by mans.
Originally committed as revision 17021 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpegts.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index e335bc6657..248a35f0ff 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -334,6 +334,13 @@ static void mpegts_close_filter(MpegTSContext *ts, MpegTSFilter *filter) pid = filter->pid; if (filter->type == MPEGTS_SECTION) av_freep(&filter->u.section_filter.section_buf); + else if (filter->type == MPEGTS_PES) { + /* referenced private data will be freed later in + * av_close_input_stream */ + if (!((PESContext *)filter->u.pes_filter.opaque)->st) { + av_freep(&filter->u.pes_filter.opaque); + } + } av_free(filter); ts->pids[pid] = NULL; |