[FFmpeg-devel] about issue 430 (memory leak in MPEG TS parser)
Måns Rullgård
mans
Fri Apr 25 00:06:53 CEST 2008
Michael Niedermayer <michaelni at gmx.at> writes:
> On Thu, Apr 24, 2008 at 05:12:58PM +0400, Vladimir Eremeev wrote:
>> Dear all.
>> I have uploaded the sample mpeg TS file and the sample program, showing
>> memory leak in the MPEG TS parser, in addition to the already reported issue 430
>>
>> ( https://roundup.mplayerhq.hu/roundup/ffmpeg/issue430 )
>>
>> Uploaded files:
>>
>> upload.mplayerhq.hu/MPlayer/incoming/issue430_wl2776/description.txt
>> description of steps performed and results. This file also contains the C source.
>>
>> upload.mplayerhq.hu/MPlayer/incoming/issue430_wl2776/issue430_wl2776_dump.ts
>> dump of the MPEG 2 transport stream, obtained with the command
>> dd if=/dev/asirx0 of=issue430_wl2776_dump.ts bs=1024 count=10000
>
> Patch to fix 2 leaks which i found is below,
> ill apply it it 24h unless mans objects.
>
> Index: libavformat/mpegts.c
> ===================================================================
> --- libavformat/mpegts.c (revision 12932)
> +++ libavformat/mpegts.c (working copy)
> @@ -767,6 +767,8 @@
> if(program)
> av_set_program_name(program, provider_name, name);
> }
> + av_free(name);
> + av_free(provider_name);
> break;
> default:
> break;
> @@ -1370,6 +1372,9 @@
> {
> MpegTSContext *ts = s->priv_data;
> int i;
> +
> + clear_programs(ts);
> +
> for(i=0;i<NB_PID_MAX;i++)
> if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]);
Go ahead.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list