audiodecoder: copy rate and channels from input before fixating output caps
authorThiago Santos <ts.santos@sisa.samsung.com>
Tue, 14 Jan 2014 16:05:54 +0000 (13:05 -0300)
committerThiago Santos <ts.santos@sisa.samsung.com>
Wed, 15 Jan 2014 18:20:39 +0000 (15:20 -0300)
commit695ddbd56f95b13e4ed1861bee8531e5079c61ac
treefcad2fb1f695fc0995cabf81732bdae1246943e0
parentae4338bd35d8aee3ecf1e5f5e24a5a51e914881d
audiodecoder: copy rate and channels from input before fixating output caps

For default caps generation when handling gap events that are sent
before any buffer, try to use caps that are closer to what upstream
provided to avoid fixating rate or channels to 1 as default.

So there are the steps:
1) Try to set rate, channels and channel-mask from upstream if provided
2) Fixate the rate and channels to the default rate and channels from
   audio lib
3) Fixate the caps just to be sure everything is fixed
4) If no channel-mask was provided and channels > 2, use a default
   channel-mask (taken from audioconvert code)

https://bugzilla.gnome.org/show_bug.cgi?id=722144
gst-libs/gst/audio/gstaudiodecoder.c