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
841c1be5
Commit
841c1be5
authored
May 22, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swr: check return value of swr_inject_silence/drop_output.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
d9b92980
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
swresample.c
libswresample/swresample.c
+6
-2
No files found.
libswresample/swresample.c
View file @
841c1be5
...
...
@@ -762,8 +762,12 @@ int64_t swr_next_pts(struct SwrContext *s, int64_t pts){
if
(
fabs
(
fdelta
)
>
s
->
min_compensation
)
{
if
(
!
s
->
outpts
||
fabs
(
fdelta
)
>
s
->
min_hard_compensation
){
if
(
delta
>
0
)
swr_inject_silence
(
s
,
delta
/
s
->
out_sample_rate
);
else
swr_drop_output
(
s
,
-
delta
/
s
->
in_sample_rate
);
int
ret
;
if
(
delta
>
0
)
ret
=
swr_inject_silence
(
s
,
delta
/
s
->
out_sample_rate
);
else
ret
=
swr_drop_output
(
s
,
-
delta
/
s
->
in_sample_rate
);
if
(
ret
<
0
){
av_log
(
s
,
AV_LOG_ERROR
,
"Failed to compensate for timestamp delta of %f
\n
"
,
fdelta
);
}
}
else
if
(
s
->
soft_compensation_duration
&&
s
->
max_soft_compensation
)
{
int
duration
=
s
->
out_sample_rate
*
s
->
soft_compensation_duration
;
int
comp
=
av_clipf
(
fdelta
,
-
s
->
max_soft_compensation
,
s
->
max_soft_compensation
)
*
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