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
759dfd56
Commit
759dfd56
authored
Jun 25, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/muxing: make more compact audio/video_time computation
parent
4ec46b11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
muxing.c
doc/examples/muxing.c
+2
-9
No files found.
doc/examples/muxing.c
View file @
759dfd56
...
@@ -460,15 +460,8 @@ int main(int argc, char **argv)
...
@@ -460,15 +460,8 @@ int main(int argc, char **argv)
frame
->
pts
=
0
;
frame
->
pts
=
0
;
for
(;;)
{
for
(;;)
{
/* Compute current audio and video time. */
/* Compute current audio and video time. */
if
(
audio_st
)
audio_time
=
audio_st
?
audio_st
->
pts
.
val
*
av_q2d
(
audio_st
->
time_base
)
:
0
.
0
;
audio_time
=
(
double
)
audio_st
->
pts
.
val
*
audio_st
->
time_base
.
num
/
audio_st
->
time_base
.
den
;
video_time
=
video_st
?
video_st
->
pts
.
val
*
av_q2d
(
video_st
->
time_base
)
:
0
.
0
;
else
audio_time
=
0
.
0
;
if
(
video_st
)
video_time
=
(
double
)
video_st
->
pts
.
val
*
video_st
->
time_base
.
num
/
video_st
->
time_base
.
den
;
else
video_time
=
0
.
0
;
if
((
!
audio_st
||
audio_time
>=
STREAM_DURATION
)
&&
if
((
!
audio_st
||
audio_time
>=
STREAM_DURATION
)
&&
(
!
video_st
||
video_time
>=
STREAM_DURATION
))
(
!
video_st
||
video_time
>=
STREAM_DURATION
))
...
...
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