Mercurial > libavformat.hg
diff mpegts.c @ 4390:5b0645175029 libavformat
Fix minor memory leak.
Patch by Jindrich Makovicka, approved by mans.
| author | michael |
|---|---|
| date | Fri, 06 Feb 2009 20:30:18 +0000 |
| parents | 85ba93088fb5 |
| children | 4d45ef755d67 |
line wrap: on
line diff
--- a/mpegts.c Fri Feb 06 15:30:41 2009 +0000 +++ b/mpegts.c Fri Feb 06 20:30:18 2009 +0000 @@ -334,6 +334,13 @@ 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;
