diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-23 13:16:07 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-23 13:27:34 +0200 |
commit | c6f4a3a70837cf259466a7aab440dc0682b08c72 (patch) | |
tree | 402abdc162ff286c32037edb1fa7db0b5489226b /libavformat/mov.c | |
parent | dd1d29bd5f313e916eb276da1eb2d1e703e80e8f (diff) | |
parent | 1f70a5ad284b33e8b3e2b40a5cb33055419781b7 (diff) |
Merge commit '1f70a5ad284b33e8b3e2b40a5cb33055419781b7'
* commit '1f70a5ad284b33e8b3e2b40a5cb33055419781b7':
mov: use tkhd enabled flag to set the default track
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index ed5fb9563f..44b7f9b695 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2384,6 +2384,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; @@ -2391,13 +2392,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); |