summaryrefslogtreecommitdiffstats
path: root/audio/filter/af_lavrresample.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-30 22:39:57 +0200
committerwm4 <wm4@nowhere>2015-06-30 22:39:57 +0200
commit7faa80ace82f89036f6bb46e9539cc4a0cdce25c (patch)
treed431c8df2a413398f806493fccfed20c88b53816 /audio/filter/af_lavrresample.c
parentc0aba8e25ae7dd93aa945d782771d897d49fbea7 (diff)
downloadmpv-7faa80ace82f89036f6bb46e9539cc4a0cdce25c.tar.bz2
mpv-7faa80ace82f89036f6bb46e9539cc4a0cdce25c.tar.xz
af_lavrresample: log actual channel layout conversions
With all the reordering etc. that can go on in this filter, it's useful to see what upmix/downmix it's actually performing.
Diffstat (limited to 'audio/filter/af_lavrresample.c')
-rw-r--r--audio/filter/af_lavrresample.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/audio/filter/af_lavrresample.c b/audio/filter/af_lavrresample.c
index 38fd84c901..a103c46dd9 100644
--- a/audio/filter/af_lavrresample.c
+++ b/audio/filter/af_lavrresample.c
@@ -270,8 +270,13 @@ static int configure_lavrr(struct af_instance *af, struct mp_audio *in,
uint64_t in_ch_layout = mp_chmap_to_lavc_unchecked(&map_in);
uint64_t out_ch_layout = mp_chmap_to_lavc_unchecked(&map_out);
- struct mp_chmap in_lavc;
+ struct mp_chmap in_lavc, out_lavc;
mp_chmap_from_lavc(&in_lavc, in_ch_layout);
+ mp_chmap_from_lavc(&out_lavc, out_ch_layout);
+
+ MP_VERBOSE(af, "Remix: %s -> %s\n", mp_chmap_to_str(&in_lavc),
+ mp_chmap_to_str(&out_lavc));
+
if (in_lavc.num != map_in.num) {
// For handling NA channels, we would have to add a planarization step.
MP_FATAL(af, "Unsupported channel remapping.\n");
@@ -281,8 +286,6 @@ static int configure_lavrr(struct af_instance *af, struct mp_audio *in,
mp_chmap_get_reorder(s->reorder_in, &map_in, &in_lavc);
transpose_order(s->reorder_in, map_in.num);
- struct mp_chmap out_lavc;
- mp_chmap_from_lavc(&out_lavc, out_ch_layout);
if (mp_chmap_equals(&out_lavc, &map_out)) {
// No intermediate step required - output new format directly.
out_samplefmtp = out_samplefmt;