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
0f6118c5
Commit
0f6118c5
authored
Jun 06, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: use av_clip() instead of nested min & max
Note: {wanted,min,max}_samples are int variables.
parent
ade5684c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
ffplay.c
ffplay.c
+1
-1
No files found.
ffplay.c
View file @
0f6118c5
...
...
@@ -2412,7 +2412,7 @@ static int synchronize_audio(VideoState *is, int nb_samples)
wanted_nb_samples
=
nb_samples
+
(
int
)(
diff
*
is
->
audio_src
.
freq
);
min_nb_samples
=
((
nb_samples
*
(
100
-
SAMPLE_CORRECTION_PERCENT_MAX
)
/
100
));
max_nb_samples
=
((
nb_samples
*
(
100
+
SAMPLE_CORRECTION_PERCENT_MAX
)
/
100
));
wanted_nb_samples
=
FFMIN
(
FFMAX
(
wanted_nb_samples
,
min_nb_samples
)
,
max_nb_samples
);
wanted_nb_samples
=
av_clip
(
wanted_nb_samples
,
min_nb_samples
,
max_nb_samples
);
}
av_log
(
NULL
,
AV_LOG_TRACE
,
"diff=%f adiff=%f sample_diff=%d apts=%0.3f %f
\n
"
,
diff
,
avg_diff
,
wanted_nb_samples
-
nb_samples
,
...
...
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