mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-03 23:05:58 +08:00
Read extradata (justification, colors, fonts, etc) for mov/mp4 timed text
Originally committed as revision 16530 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -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;
|
sc->sample_size = (bits_per_sample >> 3) * st->codec->channels;
|
||||||
}
|
}
|
||||||
} else if(st->codec->codec_type==CODEC_TYPE_SUBTITLE){
|
} 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;
|
st->codec->codec_id= id;
|
||||||
} else {
|
} else {
|
||||||
/* other codec type, just skip (rtp, mp4s, tmcd ...) */
|
/* other codec type, just skip (rtp, mp4s, tmcd ...) */
|
||||||
|
Reference in New Issue
Block a user