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
6268f2ca
Commit
6268f2ca
authored
Apr 11, 2017
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/movenc: Fix mix of declaration and statement
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
7b3cb953
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
movenc.c
libavformat/movenc.c
+5
-4
No files found.
libavformat/movenc.c
View file @
6268f2ca
...
...
@@ -2243,6 +2243,7 @@ static int mov_preroll_write_stbl_atoms(AVIOContext *pb, MOVTrack *track)
struct
sgpd_entry
*
sgpd_entries
=
NULL
;
int
entries
=
-
1
;
int
group
=
0
;
int
i
,
j
;
const
int
OPUS_SEEK_PREROLL_MS
=
80
;
int
roll_samples
=
av_rescale_q
(
OPUS_SEEK_PREROLL_MS
,
...
...
@@ -2257,10 +2258,10 @@ static int mov_preroll_write_stbl_atoms(AVIOContext *pb, MOVTrack *track)
av_assert0
(
track
->
par
->
codec_id
==
AV_CODEC_ID_OPUS
);
for
(
i
nt
i
=
0
;
i
<
track
->
entry
;
i
++
)
{
for
(
i
=
0
;
i
<
track
->
entry
;
i
++
)
{
int
roll_samples_remaining
=
roll_samples
;
int
distance
=
0
;
for
(
int
j
=
i
-
1
;
j
>=
0
;
j
--
)
{
for
(
j
=
i
-
1
;
j
>=
0
;
j
--
)
{
roll_samples_remaining
-=
get_cluster_duration
(
track
,
j
);
distance
++
;
if
(
roll_samples_remaining
<=
0
)
...
...
@@ -2295,7 +2296,7 @@ static int mov_preroll_write_stbl_atoms(AVIOContext *pb, MOVTrack *track)
ffio_wfourcc
(
pb
,
"roll"
);
avio_wb32
(
pb
,
2
);
/* default_length */
avio_wb32
(
pb
,
group
);
/* entry_count */
for
(
i
nt
i
=
0
;
i
<
entries
;
i
++
)
{
for
(
i
=
0
;
i
<
entries
;
i
++
)
{
if
(
sgpd_entries
[
i
].
group_description_index
)
{
avio_wb16
(
pb
,
-
sgpd_entries
[
i
].
roll_distance
);
/* roll_distance */
}
...
...
@@ -2307,7 +2308,7 @@ static int mov_preroll_write_stbl_atoms(AVIOContext *pb, MOVTrack *track)
avio_wb32
(
pb
,
0
);
/* fullbox */
ffio_wfourcc
(
pb
,
"roll"
);
avio_wb32
(
pb
,
entries
);
/* entry_count */
for
(
i
nt
i
=
0
;
i
<
entries
;
i
++
)
{
for
(
i
=
0
;
i
<
entries
;
i
++
)
{
avio_wb32
(
pb
,
sgpd_entries
[
i
].
count
);
/* sample_count */
avio_wb32
(
pb
,
sgpd_entries
[
i
].
group_description_index
);
/* group_description_index */
}
...
...
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