[FFmpeg-cvslog] r26175 - trunk/ffmpeg.c
aurel
subversion
Fri Dec 31 01:01:38 CET 2010
Author: aurel
Date: Fri Dec 31 01:01:37 2010
New Revision: 26175
Log:
use avsubtitle_free() instead of re-implementing it partially (fix a memleak)
Modified:
trunk/ffmpeg.c
Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c Thu Dec 30 23:30:48 2010 (r26174)
+++ trunk/ffmpeg.c Fri Dec 31 01:01:37 2010 (r26175)
@@ -1747,15 +1747,7 @@ static int output_packet(AVInputStream *
av_free(buffer_to_free);
/* XXX: allocate the subtitles in the codec ? */
if (subtitle_to_free) {
- if (subtitle_to_free->rects != NULL) {
- for (i = 0; i < subtitle_to_free->num_rects; i++) {
- av_freep(&subtitle_to_free->rects[i]->pict.data[0]);
- av_freep(&subtitle_to_free->rects[i]->pict.data[1]);
- av_freep(&subtitle_to_free->rects[i]);
- }
- av_freep(&subtitle_to_free->rects);
- }
- subtitle_to_free->num_rects = 0;
+ avsubtitle_free(subtitle_to_free);
subtitle_to_free = NULL;
}
}
More information about the ffmpeg-cvslog
mailing list