pulse: Clear unpositioned flag when setting positions
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 14 Aug 2012 10:08:27 +0000 (15:38 +0530)
committerWim Taymans <wim.taymans@collabora.co.uk>
Wed, 22 Aug 2012 09:38:42 +0000 (11:38 +0200)
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

index 607fdd4..8409291 100644 (file)
@@ -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;