changeset 4192:a48a6a414dfe libavformat

Read extradata (justification, colors, fonts, etc) for mov/mp4 timed text
author conrad
date Sun, 11 Jan 2009 08:24:44 +0000
parents 2826c1bf5ea7
children 2d3be324c648
files mov.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Sun Jan 11 05:24:41 2009 +0000
+++ b/mov.c	Sun Jan 11 08:24:44 2009 +0000
@@ -977,6 +977,10 @@
                 sc->sample_size = (bits_per_sample >> 3) * st->codec->channels;
             }
         } else if(st->codec->codec_type==CODEC_TYPE_SUBTITLE){
+            // ttxt stsd contains display flags, justification, background
+            // color, fonts, and default styles, so fake an atom to read it
+            MOVAtom fake_atom = { .size = size - (url_ftell(pb) - start_pos) };
+            mov_read_glbl(c, pb, fake_atom);
             st->codec->codec_id= id;
         } else {
             /* other codec type, just skip (rtp, mp4s, tmcd ...) */