summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-01-13 20:07:01 +0200
committerTim-Philipp Müller <tim@centricular.com>2020-01-14 14:46:30 +0000
commit0abe886c38b6282c28870d2d8da42ad66d517b31 (patch)
tree52e9fa4b0c93aa96041cab572b93e5ff6e15d239
parent7d101b4f2c78eb5944e04ccaad8d8cec7166117d (diff)
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.
-rw-r--r--gst/wavenc/gstwavenc.c2
1 files changed, 1 insertions, 1 deletions
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];
}