mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-29 23:32:33 +00:00
ext/ffmpeg/gstffmpegcodecmap.c: Instead of marking all audio decoders/encoders as accepting up to 6 channels, we whit...
Original commit message from CVS: * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new): Instead of marking all audio decoders/encoders as accepting up to 6 channels, we white-list those for which we are sure they can handle those 6 channels. Fixes #549799
This commit is contained in:
parent
7d4c7bf635
commit
459ba46c22
2 changed files with 22 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-08-29 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||||
|
|
||||||
|
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new):
|
||||||
|
Instead of marking all audio decoders/encoders as accepting up to 6
|
||||||
|
channels, we white-list those for which we are sure they can handle
|
||||||
|
those 6 channels.
|
||||||
|
Fixes #549799
|
||||||
|
|
||||||
2008-08-28 Michael Smith <msmith@songbirdnest.com>
|
2008-08-28 Michael Smith <msmith@songbirdnest.com>
|
||||||
|
|
||||||
* ext/ffmpeg/gstffmpegdemux.c:
|
* ext/ffmpeg/gstffmpegdemux.c:
|
||||||
|
|
|
@ -169,9 +169,22 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
|
||||||
"rate", G_TYPE_INT, context->sample_rate,
|
"rate", G_TYPE_INT, context->sample_rate,
|
||||||
"channels", G_TYPE_INT, context->channels, NULL);
|
"channels", G_TYPE_INT, context->channels, NULL);
|
||||||
} else {
|
} else {
|
||||||
|
gint maxchannels;
|
||||||
|
/* 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:
|
||||||
|
maxchannels = 2;
|
||||||
|
}
|
||||||
|
|
||||||
caps = gst_caps_new_simple (mimetype,
|
caps = gst_caps_new_simple (mimetype,
|
||||||
"rate", GST_TYPE_INT_RANGE, 8000, 96000,
|
"rate", GST_TYPE_INT_RANGE, 8000, 96000,
|
||||||
"channels", GST_TYPE_INT_RANGE, 1, 6, NULL);
|
"channels", GST_TYPE_INT_RANGE, 1, maxchannels, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue