Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
2cf478fe
Commit
2cf478fe
authored
Jan 24, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bandlimited invalid writes when downsampling.
parent
dbdbf98e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
17 deletions
+5
-17
modules/audio_filter/resampler/bandlimited.c
modules/audio_filter/resampler/bandlimited.c
+5
-17
No files found.
modules/audio_filter/resampler/bandlimited.c
View file @
2cf478fe
...
...
@@ -224,6 +224,8 @@ static block_t *Resample( filter_t * p_filter, block_t * p_in_buf )
while
(
p_sys
->
i_remainder
<
p_filter
->
fmt_out
.
audio
.
i_rate
)
{
if
(
p_out_buf
->
i_buffer
/
i_bytes_per_frame
<=
i_out
)
break
;
if
(
p_sys
->
d_old_factor
>=
1
)
{
...
...
@@ -250,15 +252,6 @@ static block_t *Resample( filter_t * p_filter, block_t * p_in_buf )
*(p_out+i) *= d_old_scale_factor;
}
#endif
/* Sanity check */
if
(
p_out_buf
->
i_buffer
/
i_bytes_per_frame
<=
i_out
+
1
)
{
p_out
+=
i_nb_channels
;
i_out
++
;
p_sys
->
i_remainder
+=
p_filter
->
fmt_in
.
audio
.
i_rate
;
break
;
}
}
else
{
...
...
@@ -297,7 +290,10 @@ static block_t *Resample( filter_t * p_filter, block_t * p_in_buf )
{
while
(
p_sys
->
i_remainder
<
p_filter
->
fmt_out
.
audio
.
i_rate
)
{
if
(
p_out_buf
->
i_buffer
/
i_bytes_per_frame
<=
i_out
)
break
;
assert
(
i_out
<
p_out_buf
->
i_buffer
/
i_bytes_per_frame
);
if
(
d_factor
>=
1
)
{
/* FilterFloatUP() is faster if we can use it */
...
...
@@ -324,14 +320,6 @@ static block_t *Resample( filter_t * p_filter, block_t * p_in_buf )
*(p_out+i) *= d_old_scale_factor;
}
#endif
/* Sanity check */
if
(
p_out_buf
->
i_buffer
/
i_bytes_per_frame
<=
i_out
+
1
)
{
p_out
+=
i_nb_channels
;
i_out
++
;
p_sys
->
i_remainder
+=
p_filter
->
fmt_in
.
audio
.
i_rate
;
break
;
}
}
else
{
...
...
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