Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-05-25 02:07:40 +0400
committerClément Bœsch <ubitux@gmail.com>2012-05-25 09:26:48 +0400
commitb0b7a89b07f5566f0a94fe62dbe778a516eb0daa (patch)
tree04e8a5592d92d034275506a20a2f58125b50c0fc /libavfilter/af_aresample.c
parentb0e1557fe7b10fdd34afd4ba548019c29725e607 (diff)
lavfi/aresample: print channel layouts and formats along with the rate.
Diffstat (limited to 'libavfilter/af_aresample.c')
-rw-r--r--libavfilter/af_aresample.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c
index 3b9fe9d617..30d6f6ad40 100644
--- a/libavfilter/af_aresample.c
+++ b/libavfilter/af_aresample.c
@@ -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;
}