audioenc/dec: Preserve downstream caps preference in get caps
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Tue, 3 Jan 2023 23:52:05 +0000 (18:52 -0500)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 4 Jan 2023 11:09:31 +0000 (11:09 +0000)
commite03a10a0f27eecc07480f7d67435fc474a0b0ce9
tree0647f62d4ad8b85b84b95008e11ce485cec1cf77
parentbd534af999ca596ba71c4ab869de0837403fa15b
audioenc/dec: Preserve downstream caps preference in get caps

This should fix pipelines such as this one to work as expected
  ... ! opusenc ! capsfilter caps='audio/x-opus,
  channels=1; audio/x-opus, channels=2' ! ...

The expectation is that the encoder will propose the first structure
before the second one to the source.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3673>
subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudioutilsprivate.c