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
b0050245
Commit
b0050245
authored
Dec 26, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/af_aresample: accept unknown channel layouts.
parent
6d962aec
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
af_aresample.c
libavfilter/af_aresample.c
+9
-5
No files found.
libavfilter/af_aresample.c
View file @
b0050245
...
...
@@ -98,7 +98,7 @@ static int query_formats(AVFilterContext *ctx)
AVFilterFormats
*
out_formats
;
AVFilterFormats
*
in_samplerates
=
ff_all_samplerates
();
AVFilterFormats
*
out_samplerates
;
AVFilterChannelLayouts
*
in_layouts
=
ff_all_channel_
layou
ts
();
AVFilterChannelLayouts
*
in_layouts
=
ff_all_channel_
coun
ts
();
AVFilterChannelLayouts
*
out_layouts
;
ff_formats_ref
(
in_formats
,
&
inlink
->
out_formats
);
...
...
@@ -121,7 +121,7 @@ static int query_formats(AVFilterContext *ctx)
if
(
out_layout
)
{
out_layouts
=
avfilter_make_format64_list
((
int64_t
[]){
out_layout
,
-
1
});
}
else
out_layouts
=
ff_all_channel_
layou
ts
();
out_layouts
=
ff_all_channel_
coun
ts
();
ff_channel_layouts_ref
(
out_layouts
,
&
outlink
->
in_channel_layouts
);
return
0
;
...
...
@@ -145,6 +145,10 @@ static int config_output(AVFilterLink *outlink)
0
,
ctx
);
if
(
!
aresample
->
swr
)
return
AVERROR
(
ENOMEM
);
if
(
!
inlink
->
channel_layout
)
av_opt_set_int
(
aresample
->
swr
,
"ich"
,
inlink
->
channels
,
0
);
if
(
!
outlink
->
channel_layout
)
av_opt_set_int
(
aresample
->
swr
,
"och"
,
outlink
->
channels
,
0
);
ret
=
swr_init
(
aresample
->
swr
);
if
(
ret
<
0
)
...
...
@@ -164,9 +168,9 @@ static int config_output(AVFilterLink *outlink)
av_get_channel_layout_string
(
inchl_buf
,
sizeof
(
inchl_buf
),
-
1
,
inlink
->
channel_layout
);
av_get_channel_layout_string
(
outchl_buf
,
sizeof
(
outchl_buf
),
-
1
,
outlink
->
channel_layout
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"ch
l:%s fmt:%s r:%dHz ->
chl:%s fmt:%s r:%dHz
\n
"
,
inchl_buf
,
av_get_sample_fmt_name
(
inlink
->
format
),
inlink
->
sample_rate
,
outchl_buf
,
av_get_sample_fmt_name
(
outlink
->
format
),
outlink
->
sample_rate
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"ch
:%d chl:%s fmt:%s r:%dHz -> ch:%d
chl:%s fmt:%s r:%dHz
\n
"
,
in
link
->
channels
,
in
chl_buf
,
av_get_sample_fmt_name
(
inlink
->
format
),
inlink
->
sample_rate
,
out
link
->
channels
,
out
chl_buf
,
av_get_sample_fmt_name
(
outlink
->
format
),
outlink
->
sample_rate
);
return
0
;
}
...
...
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