audioringbuffer: Reset reorder flag before check

This function might be revisited with different channel position mapping
while audio source goes into play so the reorder flag needs to be reset
before the checks happen.
This commit is contained in:
Jochen Henneberg 2019-08-26 15:03:48 +02:00 committed by Tim-Philipp Müller
parent 32ae3e336d
commit 33ae846607

View file

@ -2040,6 +2040,7 @@ gst_audio_ring_buffer_set_channel_positions (GstAudioRingBuffer * buf,
channels = buf->spec.info.channels;
to = buf->spec.info.position;
buf->need_reorder = FALSE;
if (memcmp (position, to, channels * sizeof (to[0])) == 0)
return;
@ -2048,7 +2049,6 @@ gst_audio_ring_buffer_set_channel_positions (GstAudioRingBuffer * buf,
return;
}
buf->need_reorder = FALSE;
if (!gst_audio_get_channel_reorder_map (channels, position, to,
buf->channel_reorder_map))
g_return_if_reached ();