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
4e9adc9b
Commit
4e9adc9b
authored
Oct 25, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/af_pan: support unknown layouts on output.
parent
4a640a6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
af_pan.c
libavfilter/af_pan.c
+7
-3
No files found.
libavfilter/af_pan.c
View file @
4e9adc9b
...
...
@@ -116,10 +116,10 @@ static av_cold int init(AVFilterContext *ctx)
if
(
!
args
)
return
AVERROR
(
ENOMEM
);
arg
=
av_strtok
(
args
,
"|"
,
&
tokenizer
);
ret
=
ff_parse_channel_layout
(
&
pan
->
out_channel_layout
,
NULL
,
arg
,
ctx
);
ret
=
ff_parse_channel_layout
(
&
pan
->
out_channel_layout
,
&
pan
->
nb_output_channels
,
arg
,
ctx
);
if
(
ret
<
0
)
goto
fail
;
pan
->
nb_output_channels
=
av_get_channel_layout_nb_channels
(
pan
->
out_channel_layout
);
/* parse channel specifications */
while
((
arg
=
arg0
=
av_strtok
(
NULL
,
"|"
,
&
tokenizer
)))
{
...
...
@@ -244,7 +244,9 @@ static int query_formats(AVFilterContext *ctx)
// outlink supports only requested output channel layout
layouts
=
NULL
;
ff_add_channel_layout
(
&
layouts
,
pan
->
out_channel_layout
);
ff_add_channel_layout
(
&
layouts
,
pan
->
out_channel_layout
?
pan
->
out_channel_layout
:
FF_COUNT2LAYOUT
(
pan
->
nb_output_channels
));
ff_channel_layouts_ref
(
layouts
,
&
outlink
->
in_channel_layouts
);
return
0
;
}
...
...
@@ -286,6 +288,8 @@ static int config_props(AVFilterLink *link)
0
,
ctx
);
if
(
!
pan
->
swr
)
return
AVERROR
(
ENOMEM
);
if
(
!
pan
->
out_channel_layout
)
av_opt_set_int
(
pan
->
swr
,
"och"
,
pan
->
nb_output_channels
,
0
);
// gains are pure, init the channel mapping
if
(
pan
->
pure_gains
)
{
...
...
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