From 1a8512986ae983c3a362b023b8e55fdae681bb02 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 14 Aug 2012 15:38:27 +0530 Subject: [PATCH] pulse: Clear unpositioned flag when setting positions If converting a PA channel map to gst channel positions results in a valid set of channel positions, we clear the unpositioned flag from the ringbuffer spec. --- ext/pulse/pulseutil.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/pulse/pulseutil.c b/ext/pulse/pulseutil.c index 607fdd4369..8409291859 100644 --- a/ext/pulse/pulseutil.c +++ b/ext/pulse/pulseutil.c @@ -279,6 +279,9 @@ gst_pulse_channel_map_to_gst (const pa_channel_map * map, if (invalid) { for (i = 0; i < channels; i++) pos[i] = GST_AUDIO_CHANNEL_POSITION_NONE; + } else { + if (pos[0] != GST_AUDIO_CHANNEL_POSITION_NONE) + spec->info.flags &= ~GST_AUDIO_FLAG_UNPOSITIONED; } return spec;