Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
a6c4c0f2
Commit
a6c4c0f2
authored
Dec 13, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp4enc: Avoid storing sizes in trun when they all match.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
d9a41695
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
movenc.c
libavformat/movenc.c
+3
-2
movenc.h
libavformat/movenc.h
+1
-0
No files found.
libavformat/movenc.c
View file @
a6c4c0f2
...
@@ -1447,12 +1447,12 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVTrack *track)
...
@@ -1447,12 +1447,12 @@ static int mov_write_trun_tag(AVIOContext *pb, MOVTrack *track)
int
tr_flags
=
0
;
int
tr_flags
=
0
;
int
i
;
int
i
;
tr_flags
|=
0x200
;
//FIXME
for
(
i
=
track
->
cluster_write_index
;
i
<
track
->
entry
;
i
++
){
for
(
i
=
track
->
cluster_write_index
;
i
<
track
->
entry
;
i
++
){
int64_t
duration
=
i
+
1
==
track
->
entry
?
int64_t
duration
=
i
+
1
==
track
->
entry
?
track
->
trackDuration
-
track
->
cluster
[
i
].
dts
+
track
->
cluster
[
0
].
dts
:
/* readjusting */
track
->
trackDuration
-
track
->
cluster
[
i
].
dts
+
track
->
cluster
[
0
].
dts
:
/* readjusting */
track
->
cluster
[
i
+
1
].
dts
-
track
->
cluster
[
i
].
dts
;
track
->
cluster
[
i
+
1
].
dts
-
track
->
cluster
[
i
].
dts
;
if
(
duration
!=
1
)
tr_flags
|=
0x100
;
if
(
duration
!=
1
)
tr_flags
|=
0x100
;
if
(
track
->
trex_size
!=
track
->
cluster
[
i
].
size
)
tr_flags
|=
0x200
;
if
(
track
->
trex_flags
!=
((
track
->
cluster
[
i
].
flags
&
MOV_SYNC_SAMPLE
)
?
0x02000000
:
0x01010000
))
if
(
track
->
trex_flags
!=
((
track
->
cluster
[
i
].
flags
&
MOV_SYNC_SAMPLE
)
?
0x02000000
:
0x01010000
))
tr_flags
|=
0x400
;
tr_flags
|=
0x400
;
if
(
track
->
cluster
[
i
].
cts
)
tr_flags
|=
0x800
;
if
(
track
->
cluster
[
i
].
cts
)
tr_flags
|=
0x800
;
...
@@ -1913,7 +1913,8 @@ static int mov_write_trex_tag(AVIOContext *pb, MOVTrack *track, AVStream *st)
...
@@ -1913,7 +1913,8 @@ static int mov_write_trex_tag(AVIOContext *pb, MOVTrack *track, AVStream *st)
avio_wb32
(
pb
,
track
->
trackID
);
avio_wb32
(
pb
,
track
->
trackID
);
avio_wb32
(
pb
,
1
);
// stsd_id
avio_wb32
(
pb
,
1
);
// stsd_id
avio_wb32
(
pb
,
1
);
// duration
avio_wb32
(
pb
,
1
);
// duration
avio_wb32
(
pb
,
1
/*Size*/
);
track
->
trex_size
=
track
->
entry
?
track
->
cluster
[
FFMIN
(
1
,
track
->
entry
-
1
)].
size
:
1
;
avio_wb32
(
pb
,
track
->
trex_size
);
track
->
trex_flags
=
st
->
codec
->
codec_type
!=
AVMEDIA_TYPE_VIDEO
?
0x02000000
:
0x01010000
;
track
->
trex_flags
=
st
->
codec
->
codec_type
!=
AVMEDIA_TYPE_VIDEO
?
0x02000000
:
0x01010000
;
avio_wb32
(
pb
,
track
->
trex_flags
);
avio_wb32
(
pb
,
track
->
trex_flags
);
return
updateSize
(
pb
,
pos
);
return
updateSize
(
pb
,
pos
);
...
...
libavformat/movenc.h
View file @
a6c4c0f2
...
@@ -94,6 +94,7 @@ typedef struct MOVIndex {
...
@@ -94,6 +94,7 @@ typedef struct MOVIndex {
uint32_t
tref_tag
;
uint32_t
tref_tag
;
int
tref_id
;
///< trackID of the referenced track
int
tref_id
;
///< trackID of the referenced track
uint32_t
trex_flags
;
uint32_t
trex_flags
;
int
trex_size
;
int
hint_track
;
///< the track that hints this track, -1 if no hint track is set
int
hint_track
;
///< the track that hints this track, -1 if no hint track is set
int
src_track
;
///< the track that this hint track describes
int
src_track
;
///< the track that this hint track describes
...
...
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