Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
5be805d3
Commit
5be805d3
authored
Feb 16, 2012
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mov: Use defines for sample flags in fragments
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
3eec23f3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
isom.h
libavformat/isom.h
+10
-0
mov.c
libavformat/mov.c
+1
-1
movenc.c
libavformat/movenc.c
+4
-2
No files found.
libavformat/isom.h
View file @
5be805d3
...
...
@@ -171,6 +171,16 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id);
#define MOV_TRUN_SAMPLE_FLAGS 0x400
#define MOV_TRUN_SAMPLE_CTS 0x800
#define MOV_FRAG_SAMPLE_FLAG_DEGRADATION_PRIORITY_MASK 0x0000ffff
#define MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC 0x00010000
#define MOV_FRAG_SAMPLE_FLAG_PADDING_MASK 0x000e0000
#define MOV_FRAG_SAMPLE_FLAG_REDUNDANCY_MASK 0x00300000
#define MOV_FRAG_SAMPLE_FLAG_DEPENDED_MASK 0x00c00000
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_MASK 0x03000000
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO 0x02000000
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES 0x01000000
int
ff_mov_read_esds
(
AVFormatContext
*
fc
,
AVIOContext
*
pb
,
MOVAtom
atom
);
enum
CodecID
ff_mov_get_lpcm_codec_id
(
int
bps
,
int
flags
);
...
...
libavformat/mov.c
View file @
5be805d3
...
...
@@ -2282,7 +2282,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb32
(
pb
)
:
0
;
sc
->
ctts_count
++
;
if
((
keyframe
=
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
||
(
flags
&
MOV_TRUN_FIRST_SAMPLE_FLAGS
&&
!
i
&&
!
(
sample_flags
&
0xffff0000
))
||
sample_flags
&
0x2000000
))
(
flags
&
MOV_TRUN_FIRST_SAMPLE_FLAGS
&&
!
i
&&
!
(
sample_flags
&
~
MOV_FRAG_SAMPLE_FLAG_DEGRADATION_PRIORITY_MASK
))
||
sample_flags
&
MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO
))
distance
=
0
;
av_add_index_entry
(
st
,
offset
,
dts
,
sample_size
,
distance
,
keyframe
?
AVINDEX_KEYFRAME
:
0
);
...
...
libavformat/movenc.c
View file @
5be805d3
...
...
@@ -2214,7 +2214,8 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVTrack *track,
if
(
flags
&
MOV_TFHD_DEFAULT_FLAGS
)
{
track
->
default_sample_flags
=
track
->
enc
->
codec_type
==
AVMEDIA_TYPE_VIDEO
?
0x01010000
:
0x02000000
;
(
MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES
|
MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC
)
:
MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO
;
avio_wb32
(
pb
,
track
->
default_sample_flags
);
}
...
...
@@ -2223,7 +2224,8 @@ static int mov_write_tfhd_tag(AVIOContext *pb, MOVTrack *track,
static
uint32_t
get_sample_flags
(
MOVTrack
*
track
,
MOVIentry
*
entry
)
{
return
entry
->
flags
&
MOV_SYNC_SAMPLE
?
0x02000000
:
0x01010000
;
return
entry
->
flags
&
MOV_SYNC_SAMPLE
?
MOV_FRAG_SAMPLE_FLAG_DEPENDS_NO
:
(
MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES
|
MOV_FRAG_SAMPLE_FLAG_IS_NON_SYNC
);
}
static
int
mov_write_trun_tag
(
AVIOContext
*
pb
,
MOVTrack
*
track
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment