Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
1f70a5ad
Commit
1f70a5ad
authored
11 years ago
by
John Stebbins
Committed by
Anton Khirnov
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mov: use tkhd enabled flag to set the default track
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
e7b31844
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavformat/isom.h
+5
-0
5 additions, 0 deletions
libavformat/isom.h
libavformat/mov.c
+3
-7
3 additions, 7 deletions
libavformat/mov.c
with
8 additions
and
7 deletions
libavformat/isom.h
+
5
−
0
View file @
1f70a5ad
...
@@ -190,6 +190,11 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id);
...
@@ -190,6 +190,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
);
...
...
This diff is collapsed.
Click to expand it.
libavformat/mov.c
+
3
−
7
View file @
1f70a5ad
...
@@ -2125,6 +2125,7 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
...
@@ -2125,6 +2125,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
;
...
@@ -2132,13 +2133,8 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
...
@@ -2132,13 +2133,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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment