forked from FFmpeg/FFmpeg
use avsubtitle_free() instead of re-implementing it partially (fix a memleak)
Originally committed as revision 26175 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
0cbd5ff704
commit
1d6233d315
1 changed files with 1 additions and 9 deletions
10
ffmpeg.c
10
ffmpeg.c
|
@ -1747,15 +1747,7 @@ static int output_packet(AVInputStream *ist, int ist_index,
|
||||||
av_free(buffer_to_free);
|
av_free(buffer_to_free);
|
||||||
/* XXX: allocate the subtitles in the codec ? */
|
/* XXX: allocate the subtitles in the codec ? */
|
||||||
if (subtitle_to_free) {
|
if (subtitle_to_free) {
|
||||||
if (subtitle_to_free->rects != NULL) {
|
avsubtitle_free(subtitle_to_free);
|
||||||
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;
|
|
||||||
subtitle_to_free = NULL;
|
subtitle_to_free = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue