[FFmpeg-cvslog] mov: read tmcd tag and set timecode drop flag accordingly.
Baptiste Coudurier
git at videolan.org
Tue Aug 30 09:24:02 CEST 2011
ffmpeg | branch: master | Baptiste Coudurier <baptiste.coudurier at gmail.com> | Mon Jul 18 10:13:37 2011 +0200| [f33be93b1b2714b48d133819b6b183ac82a9d67e] | committer: Clément Bœsch
mov: read tmcd tag and set timecode drop flag accordingly.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f33be93b1b2714b48d133819b6b183ac82a9d67e
---
libavformat/mov.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2663aa0..5464b78 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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 ...) */
More information about the ffmpeg-cvslog
mailing list