aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2011-07-18 10:13:37 +0200
committerClément Bœsch <ubitux@gmail.com>2011-08-30 09:14:05 +0200
commitf33be93b1b2714b48d133819b6b183ac82a9d67e (patch)
treeea5daa7b47942079f45cbf869579a61d3e16234b /libavformat/mov.c
parent62702075113bafa1fe53038b2cf0c455cff7a330 (diff)
downloadffmpeg-f33be93b1b2714b48d133819b6b183ac82a9d67e.tar.gz
mov: read tmcd tag and set timecode drop flag accordingly.
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2663aa0221..5464b783d3 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 ...) */