summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-07-17 00:28:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-07-17 00:28:12 +0000
commitc6ec28b18cd1eb7d39e6163137367f2d1c62aa7c (patch)
treea0055aeb706ad0230cf7bc7cc8b48d582057f9d8 /ffmpeg.c
parent6e5c1877b2a93dd63610a1504e95bddc891424f3 (diff)
DVB subtitle decoder by (Ian Caulfield: imc25, cam ac uk)
Originally committed as revision 4448 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index aba78c4712..dac6029920 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1423,8 +1423,14 @@ 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) {
- av_free(subtitle_to_free->bitmap);
- av_free(subtitle_to_free->rgba_palette);
+ if (subtitle_to_free->rects != NULL) {
+ for (i = 0; i < subtitle_to_free->num_rects; i++) {
+ av_free(subtitle_to_free->rects[i].bitmap);
+ av_free(subtitle_to_free->rects[i].rgba_palette);
+ }
+ av_freep(&subtitle_to_free->rects);
+ }
+ subtitle_to_free->num_rects = 0;
subtitle_to_free = NULL;
}
}