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
f297dd38
Commit
f297dd38
authored
May 22, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncts: reset delta to 0 when it's not used.
Fixes an invalid write.
parent
713548cb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
af_asyncts.c
libavfilter/af_asyncts.c
+7
-4
No files found.
libavfilter/af_asyncts.c
View file @
f297dd38
...
@@ -182,10 +182,13 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
...
@@ -182,10 +182,13 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *buf)
if
(
labs
(
delta
)
>
s
->
min_delta
)
{
if
(
labs
(
delta
)
>
s
->
min_delta
)
{
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Discontinuity - %"
PRId64
" samples.
\n
"
,
delta
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Discontinuity - %"
PRId64
" samples.
\n
"
,
delta
);
out_size
+=
delta
;
out_size
+=
delta
;
}
else
if
(
s
->
resample
)
{
}
else
{
int
comp
=
av_clip
(
delta
,
-
s
->
max_comp
,
s
->
max_comp
);
if
(
s
->
resample
)
{
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Compensating %d samples per second.
\n
"
,
comp
);
int
comp
=
av_clip
(
delta
,
-
s
->
max_comp
,
s
->
max_comp
);
avresample_set_compensation
(
s
->
avr
,
delta
,
inlink
->
sample_rate
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"Compensating %d samples per second.
\n
"
,
comp
);
avresample_set_compensation
(
s
->
avr
,
delta
,
inlink
->
sample_rate
);
}
delta
=
0
;
}
}
if
(
out_size
>
0
)
{
if
(
out_size
>
0
)
{
...
...
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