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
f3413405
Commit
f3413405
authored
Jun 09, 2014
by
Ronald S. Bultje
Committed by
Michael Niedermayer
Jun 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swr: handle 64bit overflow check in multiple_resample().
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
637093a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
resample.c
libswresample/resample.c
+2
-0
resample_template.c
libswresample/resample_template.c
+1
-2
No files found.
libswresample/resample.c
View file @
f3413405
...
...
@@ -335,9 +335,11 @@ static int multiple_resample(ResampleContext *c, AudioData *dst, int dst_size, A
int
i
,
ret
=
-
1
;
int
av_unused
mm_flags
=
av_get_cpu_flags
();
int
need_emms
=
0
;
int64_t
max_src_size
=
(
INT64_MAX
>>
(
c
->
phase_shift
+
1
))
/
c
->
src_incr
;
if
(
c
->
compensation_distance
)
dst_size
=
FFMIN
(
dst_size
,
c
->
compensation_distance
);
src_size
=
FFMIN
(
src_size
,
max_src_size
);
for
(
i
=
0
;
i
<
dst
->
ch_count
;
i
++
){
#if HAVE_MMXEXT_INLINE
...
...
libswresample/resample_template.c
View file @
f3413405
...
...
@@ -133,8 +133,7 @@ int RENAME(swri_resample)(ResampleContext *c, DELEM *dst, const DELEM *src, int
av_assert2
(
index
>=
0
);
*
consumed
=
index
;
index
=
0
;
}
else
if
(
index
>=
0
&&
src_size
*
(
int64_t
)
c
->
src_incr
<
(
INT64_MAX
>>
(
c
->
phase_shift
+
1
)))
{
}
else
if
(
index
>=
0
)
{
int64_t
end_index
=
(
1LL
+
src_size
-
c
->
filter_length
)
<<
c
->
phase_shift
;
int64_t
delta_frac
=
(
end_index
-
index
)
*
c
->
src_incr
-
c
->
frac
;
int
delta_n
=
(
delta_frac
+
c
->
dst_incr
-
1
)
/
c
->
dst_incr
;
...
...
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