summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorJohn Stebbins <stebbins@jetheaddev.com>2013-08-22 07:25:17 -0700
committerAnton Khirnov <anton@khirnov.net>2013-08-23 09:24:22 +0200
commit1f70a5ad284b33e8b3e2b40a5cb33055419781b7 (patch)
tree45de8013eabf3572f003991e9b30a99f28748287 /libavformat/mov.c
parente7b31844f68eb51137740c5eec29b35eb4994004 (diff)
mov: use tkhd enabled flag to set the default track
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0c938cd2dd..c036b21fd3 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2125,6 +2125,7 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
AVStream *st;
MOVStreamContext *sc;
int version;
+ int flags;
if (c->fc->nb_streams < 1)
return 0;
@@ -2132,13 +2133,8 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
sc = st->priv_data;
version = avio_r8(pb);
- avio_rb24(pb); /* flags */
- /*
- MOV_TRACK_ENABLED 0x0001
- MOV_TRACK_IN_MOVIE 0x0002
- MOV_TRACK_IN_PREVIEW 0x0004
- MOV_TRACK_IN_POSTER 0x0008
- */
+ flags = avio_rb24(pb);
+ st->disposition |= (flags & MOV_TKHD_FLAG_ENABLED) ? AV_DISPOSITION_DEFAULT : 0;
if (version == 1) {
avio_rb64(pb);