mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
ext/ffmpeg/gstffmpegcodecmap.c: Fix regression in template caps limitations; expose more than 2 channels in both src ...
Original commit message from CVS: * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new): Fix regression in template caps limitations; expose more than 2 channels in both src and sink template if so supported.
This commit is contained in:
parent
0165bad2a8
commit
51e0b9b509
2 changed files with 22 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-11-04 Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
|
||||
|
||||
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new):
|
||||
Fix regression in template caps limitations;
|
||||
expose more than 2 channels in both src and sink template
|
||||
if so supported.
|
||||
|
||||
2008-11-04 Stefan Kost <ensonic@users.sf.net>
|
||||
|
||||
* ext/ffmpeg/Makefile.am:
|
||||
|
|
|
@ -205,7 +205,7 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
|
|||
const gint *rates = NULL;
|
||||
gint n_rates = 0;
|
||||
|
||||
if (context)
|
||||
if (context) {
|
||||
/* so we must be after restricted caps in this particular case */
|
||||
switch (codec_id) {
|
||||
case CODEC_ID_MP2:
|
||||
|
@ -221,7 +221,6 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
|
|||
const static gint l_rates[] = { 48000, 44100, 32000 };
|
||||
n_rates = G_N_ELEMENTS (l_rates);
|
||||
rates = l_rates;
|
||||
maxchannels = 6;
|
||||
break;
|
||||
}
|
||||
case CODEC_ID_ADPCM_SWF:
|
||||
|
@ -241,15 +240,23 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
|
|||
case CODEC_ID_ADPCM_G726:
|
||||
maxchannels = 1;
|
||||
break;
|
||||
case CODEC_ID_AAC:
|
||||
case CODEC_ID_DTS:
|
||||
/* Until decoders/encoders expose the maximum number of channels
|
||||
* they support, we whitelist them here. */
|
||||
maxchannels = 6;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* regardless of encode/decode, open up channels if applicable */
|
||||
/* Until decoders/encoders expose the maximum number of channels
|
||||
* they support, we whitelist them here. */
|
||||
switch (codec_id) {
|
||||
case CODEC_ID_AC3:
|
||||
case CODEC_ID_AAC:
|
||||
case CODEC_ID_DTS:
|
||||
maxchannels = 6;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (maxchannels == 1)
|
||||
caps = gst_caps_new_simple (mimetype,
|
||||
|
|
Loading…
Reference in a new issue