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
2c0d24bf
Commit
2c0d24bf
authored
Dec 10, 2002
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/audio_output/filters.c: fix for resampler buffer size.
parent
05b378dd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
src/audio_output/filters.c
src/audio_output/filters.c
+5
-7
No files found.
src/audio_output/filters.c
View file @
2c0d24bf
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* filters.c : audio output filters management
* filters.c : audio output filters management
*****************************************************************************
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* Copyright (C) 2002 VideoLAN
* $Id: filters.c,v 1.1
5 2002/12/06 10:10:39 sam
Exp $
* $Id: filters.c,v 1.1
6 2002/12/10 21:55:01 gbazin
Exp $
*
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*
...
@@ -298,13 +298,11 @@ void aout_FiltersPlay( aout_instance_t * p_aout,
...
@@ -298,13 +298,11 @@ void aout_FiltersPlay( aout_instance_t * p_aout,
aout_filter_t
*
p_filter
=
pp_filters
[
i
];
aout_filter_t
*
p_filter
=
pp_filters
[
i
];
aout_buffer_t
*
p_output_buffer
;
aout_buffer_t
*
p_output_buffer
;
/* We need this because resamplers can produce more samples than
/* Resamplers can produce slightly more samples than (i_in_nb *
(i_in_nb * p_filter->output.i_rate / p_filter->input.i_rate) */
* p_filter->output.i_rate / p_filter->input.i_rate) so we need
int
i_compensate_rounding
=
2
*
p_filter
->
input
.
i_rate
* slightly bigger buffers. */
/
p_filter
->
output
.
i_rate
;
aout_BufferAlloc
(
&
p_filter
->
output_alloc
,
aout_BufferAlloc
(
&
p_filter
->
output_alloc
,
((
mtime_t
)(
*
pp_input_buffer
)
->
i_nb_samples
+
i_compensate_rounding
)
((
mtime_t
)(
*
pp_input_buffer
)
->
i_nb_samples
+
2
)
*
1000000
/
p_filter
->
input
.
i_rate
,
*
1000000
/
p_filter
->
input
.
i_rate
,
*
pp_input_buffer
,
p_output_buffer
);
*
pp_input_buffer
,
p_output_buffer
);
if
(
p_output_buffer
==
NULL
)
if
(
p_output_buffer
==
NULL
)
...
...
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