aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJindřich Makovička <makovick@gmail.com>2009-02-06 20:30:18 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-02-06 20:30:18 +0000
commitdcd913d9ed6c15ea53882894baa343695575abcd (patch)
tree1bd1e972485cfd386934e99e6446b09d2cfd5971 /libavformat
parent17a5894a23147e328ca3268bf00b068a9ee2c826 (diff)
downloadffmpeg-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.c7
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;