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.
This commit is contained in:
Sebastian Dröge 2020-01-13 20:07:01 +02:00 committed by GStreamer Merge Bot
parent 9c86414279
commit 451fc5c112

View file

@ -250,7 +250,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];
}