GNOME Bugzilla – Bug 733866
interleave: caps negotiation fails when input caps have non-interleaved layout
Last modified: 2014-08-11 06:56:53 UTC
This fails: gst-launch-1.0 interleave name=i ! audioconvert ! pulsesink audiotestsrc ! audioconvert ! "audio/x-raw, format=(string)F32LE, layout=(string)non-interleaved, rate=(int)44100, channels=(int)1, channel-mask=(bitmask)0x0000000000000001" ! queue ! i.sink_0 audiotestsrc ! audioconvert ! "audio/x-raw, format=(string)F32LE, layout=(string)non-interleaved, rate=(int)44100, channels=(int)1, channel-mask=(bitmask)0x0000000000000002" ! queue ! i.sink_1 but changing input layout to interleaved on the capsfilters make it work. This is because gst_interleave_sink_setcaps() doesn't properly set the layout field of the caps, it reuses the layout of the caps event. I think the layout should be unconditionally set to interleaved there :) I'll try to provide a unit-test along with the patch.
audiotestsrc emits buffers with interleaved layout so it can't work anyway but I got a unittest with fakesrc emitting buffers with non-interleaved layout.
Created attachment 281878 [details] [review] interleave: set output caps layout to interleaved Set output caps layout independently from input caps layout which can be either non-interleaved or interleaved.
commit b8b5704445b831bc505a825cfef24ef30e00d5f0 Author: Philippe Normand <philn@igalia.com> Date: Mon Jul 28 16:49:16 2014 +0200 interleave: set output caps layout to interleaved Set output caps layout independently from input caps layout which can be either non-interleaved or interleaved. https://bugzilla.gnome.org/show_bug.cgi?id=733866