Commit 459ba46c authored by Edward Hervey's avatar Edward Hervey 🤘

ext/ffmpeg/gstffmpegcodecmap.c: Instead of marking all audio decoders/encoders...

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
parent 7d4c7bf6
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>
* 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,
"channels", G_TYPE_INT, context->channels, NULL);
} 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,
"rate", GST_TYPE_INT_RANGE, 8000, 96000,
"channels", GST_TYPE_INT_RANGE, 1, 6, NULL);
"channels", GST_TYPE_INT_RANGE, 1, maxchannels, NULL);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment