1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

Merge commit '1f70a5ad284b33e8b3e2b40a5cb33055419781b7'

* commit '1f70a5ad284b33e8b3e2b40a5cb33055419781b7':
  mov: use tkhd enabled flag to set the default track

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-08-23 13:16:07 +02:00
commit c6f4a3a708
2 changed files with 8 additions and 7 deletions

View File

@ -202,6 +202,11 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id);
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO 0x02000000 #define MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO 0x02000000
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES 0x01000000 #define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES 0x01000000
#define MOV_TKHD_FLAG_ENABLED 0x0001
#define MOV_TKHD_FLAG_IN_MOVIE 0x0002
#define MOV_TKHD_FLAG_IN_PREVIEW 0x0004
#define MOV_TKHD_FLAG_IN_POSTER 0x0008
int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom); int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom);
enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags); enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags);

View File

@ -2384,6 +2384,7 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
AVStream *st; AVStream *st;
MOVStreamContext *sc; MOVStreamContext *sc;
int version; int version;
int flags;
if (c->fc->nb_streams < 1) if (c->fc->nb_streams < 1)
return 0; return 0;
@ -2391,13 +2392,8 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
sc = st->priv_data; sc = st->priv_data;
version = avio_r8(pb); version = avio_r8(pb);
avio_rb24(pb); /* flags */ flags = avio_rb24(pb);
/* st->disposition |= (flags & MOV_TKHD_FLAG_ENABLED) ? AV_DISPOSITION_DEFAULT : 0;
MOV_TRACK_ENABLED 0x0001
MOV_TRACK_IN_MOVIE 0x0002
MOV_TRACK_IN_PREVIEW 0x0004
MOV_TRACK_IN_POSTER 0x0008
*/
if (version == 1) { if (version == 1) {
avio_rb64(pb); avio_rb64(pb);