From 0abe886c38b6282c28870d2d8da42ad66d517b31 Mon Sep 17 00:00:00 2001 From: Sebastian Dröge Date: Mon, 13 Jan 2020 20:07:01 +0200 Subject: wavenc: Fix writing of the channel mask with >2 channels The channel position is an enum but the conversion code assumed it's a mask. Convert accordingly. --- gst/wavenc/gstwavenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/wavenc/gstwavenc.c b/gst/wavenc/gstwavenc.c index 94a8bd0d0..bd6935eef 100644 --- a/gst/wavenc/gstwavenc.c +++ b/gst/wavenc/gstwavenc.c @@ -251,7 +251,7 @@ gstmask_to_wavmask (guint64 gstmask, GstAudioChannelPosition * pos) return 0; for (k = 0; k < G_N_ELEMENTS (wav_pos); ++k) { - if (gstmask & wav_pos[k]) { + if (gstmask & (G_GUINT64_CONSTANT (1) << wav_pos[k])) { ret |= mask; pos[chan++] = wav_pos[k]; } -- cgit v1.2.3