From 6d659e3c6fe978e0400ab21d317504d18642e759 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 8 Oct 2013 16:02:46 +0200 Subject: [PATCH] audioringbuffer: Don't clear need_reorder flag too early gst_audio_ring_buffer_set_channel_positions() checks whether the given positions are identical with the current setup and returns immediately if so. But it also clears need_reorder flag before this comparison, thus this flag might be wrongly cleared if the function is called twice with the same channel positions. Move the flag clearance after the check. https://bugzilla.gnome.org/show_bug.cgi?id=709754 --- gst-libs/gst/audio/gstaudioringbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstaudioringbuffer.c b/gst-libs/gst/audio/gstaudioringbuffer.c index 0a883efdcb..da9ae4f183 100644 --- a/gst-libs/gst/audio/gstaudioringbuffer.c +++ b/gst-libs/gst/audio/gstaudioringbuffer.c @@ -1950,10 +1950,10 @@ 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; + buf->need_reorder = FALSE; if (!gst_audio_get_channel_reorder_map (channels, position, to, buf->channel_reorder_map)) g_return_if_reached ();