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
eb9ba527
Commit
eb9ba527
authored
Feb 20, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
af_pan: remove the indirect function call.
libswresample is used in all cases.
parent
6a3f1726
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
16 deletions
+1
-16
af_pan.c
libavfilter/af_pan.c
+1
-16
No files found.
libavfilter/af_pan.c
View file @
eb9ba527
...
...
@@ -48,11 +48,6 @@ typedef struct PanContext {
int
nb_output_channels
;
int
pure_gains
;
void
(
*
filter_samples
)(
struct
PanContext
*
,
AVFilterBufferRef
*
,
AVFilterBufferRef
*
,
int
);
/* channel mapping specific */
int
channel_map
[
SWR_CH_MAX
];
struct
SwrContext
*
swr
;
...
...
@@ -332,14 +327,6 @@ static int config_props(AVFilterLink *link)
return
0
;
}
static
void
filter_samples_channel_mapping
(
PanContext
*
pan
,
AVFilterBufferRef
*
outsamples
,
AVFilterBufferRef
*
insamples
,
int
n
)
{
swr_convert
(
pan
->
swr
,
outsamples
->
data
,
n
,
(
void
*
)
insamples
->
data
,
n
);
}
static
void
filter_samples
(
AVFilterLink
*
inlink
,
AVFilterBufferRef
*
insamples
)
{
int
n
=
insamples
->
audio
->
nb_samples
;
...
...
@@ -347,8 +334,7 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamples)
AVFilterBufferRef
*
outsamples
=
avfilter_get_audio_buffer
(
outlink
,
AV_PERM_WRITE
,
n
);
PanContext
*
pan
=
inlink
->
dst
->
priv
;
pan
->
filter_samples
(
pan
,
outsamples
,
insamples
,
n
);
swr_convert
(
pan
->
swr
,
outsamples
->
data
,
n
,
(
void
*
)
insamples
->
data
,
n
);
avfilter_copy_buffer_ref_props
(
outsamples
,
insamples
);
outsamples
->
audio
->
channel_layout
=
outlink
->
channel_layout
;
outsamples
->
audio
->
planar
=
outlink
->
planar
;
...
...
@@ -368,7 +354,6 @@ static int query_formats(AVFilterContext *ctx)
/* libswr supports any sample and packing formats */
avfilter_set_common_sample_formats
(
ctx
,
avfilter_make_all_formats
(
AVMEDIA_TYPE_AUDIO
));
avfilter_set_common_packing_formats
(
ctx
,
avfilter_make_all_packing_formats
());
pan
->
filter_samples
=
filter_samples_channel_mapping
;
// inlink supports any channel layout
formats
=
avfilter_make_all_channel_layouts
();
...
...
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