1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

mov: read tmcd tag and set timecode drop flag accordingly.

This commit is contained in:
Baptiste Coudurier 2011-07-18 10:13:37 +02:00 committed by Clément Bœsch
parent 6270207511
commit f33be93b1b

View File

@ -1193,7 +1193,18 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
st->codec->width = sc->width;
st->codec->height = sc->height;
} else {
/* other codec type, just skip (rtp, mp4s, tmcd ...) */
if (st->codec->codec_tag == MKTAG('t','m','c','d')) {
int val;
avio_rb32(pb); /* reserved */
val = avio_rb32(pb); /* flags */
if (val & 1)
st->codec->flags2 |= CODEC_FLAG2_DROP_FRAME_TIMECODE;
avio_rb32(pb);
avio_rb32(pb);
st->codec->time_base.den = get_byte(pb);
st->codec->time_base.num = 1;
}
/* other codec type, just skip (rtp, mp4s, ...) */
avio_skip(pb, size - (avio_tell(pb) - start_pos));
}
/* this will read extra atoms at the end (wave, alac, damr, avcC, SMI ...) */