]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Read extradata (justification, colors, fonts, etc) for mov/mp4 timed text
authorconrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 11 Jan 2009 08:24:44 +0000 (08:24 +0000)
committerconrad <conrad@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 11 Jan 2009 08:24:44 +0000 (08:24 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16530 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/mov.c

index c0c057a4bfef0b20aa98d5674f035162b6fc263e..ed027db04e20b326fd5c5d4cf89681f5eaba137c 100644 (file)
@@ -977,6 +977,10 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
                 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 ...) */