Originally committed as revision 26175 to svn://svn.ffmpeg.org/ffmpeg/trunk
Aurelien Jacobs authored on 2010/12/31 09:01:37... | ... |
@@ -1747,15 +1747,7 @@ static int output_packet(AVInputStream *ist, int ist_index, |
1747 | 1747 |
av_free(buffer_to_free); |
1748 | 1748 |
/* XXX: allocate the subtitles in the codec ? */ |
1749 | 1749 |
if (subtitle_to_free) { |
1750 |
- if (subtitle_to_free->rects != NULL) { |
|
1751 |
- for (i = 0; i < subtitle_to_free->num_rects; i++) { |
|
1752 |
- av_freep(&subtitle_to_free->rects[i]->pict.data[0]); |
|
1753 |
- av_freep(&subtitle_to_free->rects[i]->pict.data[1]); |
|
1754 |
- av_freep(&subtitle_to_free->rects[i]); |
|
1755 |
- } |
|
1756 |
- av_freep(&subtitle_to_free->rects); |
|
1757 |
- } |
|
1758 |
- subtitle_to_free->num_rects = 0; |
|
1750 |
+ avsubtitle_free(subtitle_to_free); |
|
1759 | 1751 |
subtitle_to_free = NULL; |
1760 | 1752 |
} |
1761 | 1753 |
} |