mpg123: rework set_format code so mpg123audiodec works with decodebin/playbin
authorCarlos Rafael Giani <dv@pseudoterminal.org>
Sat, 3 Jan 2015 12:06:45 +0000 (13:06 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 16 Feb 2016 10:40:40 +0000 (10:40 +0000)
commit2fe38328d28c5d519e5537a31738b5ec3e253b29
tree94e0eb84ac568ae0817102e0a2bb91a88977438c
parentbbd6b14d46bcd3fc1d9ca7aeb64d68620e183524
mpg123: rework set_format code so mpg123audiodec works with decodebin/playbin

The old code was using gst_caps_normalize() and was generally overly
complex. Simplify by picking sample rate and number of channels from
upstream and the sample format from the allowed caps. If the format caps
is a list of strins, just pick the first one. And if the srcpad isn't
linked yet, use the default format (S16).

https://bugzilla.gnome.org/show_bug.cgi?id=740195
ext/mpg123/gstmpg123audiodec.c