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
d8710228
Commit
d8710228
authored
Feb 08, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: change sync_opts code to be more similar to qatar.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c84acc31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
ffmpeg.c
ffmpeg.c
+4
-3
No files found.
ffmpeg.c
View file @
d8710228
...
...
@@ -1078,6 +1078,8 @@ static int encode_audio_frame(AVFormatContext *s, OutputStream *ost,
av_log
(
NULL
,
AV_LOG_FATAL
,
"Audio encoding failed
\n
"
);
exit_program
(
1
);
}
ost
->
sync_opts
+=
frame
->
nb_samples
;
}
got_packet
=
0
;
...
...
@@ -1101,9 +1103,6 @@ static int encode_audio_frame(AVFormatContext *s, OutputStream *ost,
av_free_packet
(
&
pkt
);
}
if
(
frame
)
ost
->
sync_opts
+=
frame
->
nb_samples
;
return
ret
;
}
...
...
@@ -1356,6 +1355,8 @@ static void do_subtitle_out(AVFormatContext *s,
nb
=
1
;
for
(
i
=
0
;
i
<
nb
;
i
++
)
{
ost
->
sync_opts
=
av_rescale_q
(
pts
,
ist
->
st
->
time_base
,
enc
->
time_base
);
sub
->
pts
=
av_rescale_q
(
pts
,
ist
->
st
->
time_base
,
AV_TIME_BASE_Q
);
// start_display_time is required to be 0
sub
->
pts
+=
av_rescale_q
(
sub
->
start_display_time
,
(
AVRational
){
1
,
1000
},
AV_TIME_BASE_Q
);
...
...
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