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
b0b7a89b
Commit
b0b7a89b
authored
May 24, 2012
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/aresample: print channel layouts and formats along with the rate.
parent
b0e1557f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
af_aresample.c
libavfilter/af_aresample.c
+6
-2
No files found.
libavfilter/af_aresample.c
View file @
b0b7a89b
...
...
@@ -133,6 +133,7 @@ static int config_output(AVFilterLink *outlink)
int
out_rate
;
uint64_t
out_layout
;
enum
AVSampleFormat
out_format
;
char
inchl_buf
[
128
],
outchl_buf
[
128
];
aresample
->
swr
=
swr_alloc_set_opts
(
aresample
->
swr
,
outlink
->
channel_layout
,
outlink
->
format
,
outlink
->
sample_rate
,
...
...
@@ -156,8 +157,11 @@ static int config_output(AVFilterLink *outlink)
aresample
->
ratio
=
(
double
)
outlink
->
sample_rate
/
inlink
->
sample_rate
;
av_log
(
ctx
,
AV_LOG_INFO
,
"r:%"
PRId64
"Hz -> r:%"
PRId64
"Hz
\n
"
,
inlink
->
sample_rate
,
outlink
->
sample_rate
);
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_INFO
,
"chl:%s fmt:%s r:%"
PRId64
"Hz -> chl:%s fmt:%s r:%"
PRId64
"Hz
\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
);
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