[FFmpeg-devel] [PATCH 1/2] Support for large boxes(>32 bit) for 3gpp timed text
Niklesh Lalwani
niklesh.lalwani at iitb.ac.in
Mon Apr 27 01:23:26 CEST 2015
From: Niklesh <niklesh.lalwani at iitb.ac.in>
Signed-off-by: Niklesh <niklesh.lalwani at iitb.ac.in>
---
libavcodec/movtextdec.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index ab4efdb..a5d995d 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -96,7 +96,9 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
char *ptr = avpkt->data;
char *end;
//char *ptr_temp;
- int text_length, tsmb_type, style_entries, tsmb_size;
+ int text_length, style_entries;
+ uint32_t tsmb_type;
+ uint64_t tsmb_size;
int **style_start = {0,};
int **style_end = {0,};
int **style_flags = {0,};
@@ -145,6 +147,11 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
tsmb_type = AV_RB32(tsmb);
tsmb += 4;
+ if (tsmb_size == 0xFFFFFFFF) {
+ tsmb_size = AV_RB64(tsmb);
+ tsmb += 8;
+ }
+
if (tsmb_type == MKBETAG('s','t','y','l')) {
style_entries = AV_RB16(tsmb);
tsmb += 2;
--
1.9.1
More information about the ffmpeg-devel
mailing list