aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2010-12-31 00:01:37 +0000
committerAurelien Jacobs <aurel@gnuage.org>2010-12-31 00:01:37 +0000
commit1d6233d315dc0af552b16e5b4d14084fbeb9fbb5 (patch)
treece6f8e25396b9eddadbd3ffb652cd1e07fafb257 /ffmpeg.c
parent0cbd5ff7049961045dfc5ac44c40f7ae4e0db54d (diff)
downloadffmpeg-1d6233d315dc0af552b16e5b4d14084fbeb9fbb5.tar.gz
use avsubtitle_free() instead of re-implementing it partially (fix a memleak)
Originally committed as revision 26175 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 94919814bc..87f6d99d82 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1747,15 +1747,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
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;
}
}