aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2009-01-11 08:24:44 +0000
committerDavid Conrad <lessen42@gmail.com>2009-01-11 08:24:44 +0000
commit58e9f2edb6cbb4f97c4a9a48fd086cfec19b6f26 (patch)
tree23b42a016de8e9258331aa9c84308f5d1fcb1120 /libavformat/mov.c
parent6751a00a3f5c0ecaec134686cd1e02d16aaca099 (diff)
downloadffmpeg-58e9f2edb6cbb4f97c4a9a48fd086cfec19b6f26.tar.gz
Read extradata (justification, colors, fonts, etc) for mov/mp4 timed text
Originally committed as revision 16530 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c0c057a4bf..ed027db04e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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 ...) */