ext/ffmpeg/gstffmpegcodecmap.c: Narrow down the allowed channels and sample rates for AMR.

Original commit message from CVS:
Patch by: Dejan Sakelšak <sakdean at gmail dot com>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new):
Narrow down the allowed channels and sample rates for AMR.
Fixes #566647.
This commit is contained in:
Dejan Sakelšak 2009-01-05 18:08:20 +00:00 committed by Wim Taymans
parent 7d66116903
commit 2742ccf931
2 changed files with 24 additions and 0 deletions

View file

@ -1,3 +1,11 @@
2009-01-05 Wim Taymans <wim.taymans@collabora.co.uk>
Patch by: Dejan Sakelšak <sakdean at gmail dot com>
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ff_aud_caps_new):
Narrow down the allowed channels and sample rates for AMR.
Fixes #566647.
2009-01-05 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* ffmpegrev:

View file

@ -347,6 +347,22 @@ gst_ff_aud_caps_new (AVCodecContext * context, enum CodecID codec_id,
case CODEC_ID_ADPCM_G726:
maxchannels = 1;
break;
case CODEC_ID_AMR_NB:
{
const static gint l_rates[] = { 8000 };
maxchannels = 1;
n_rates = G_N_ELEMENTS (l_rates);
rates = l_rates;
break;
}
case CODEC_ID_AMR_WB:
{
const static gint l_rates[] = { 16000 };
maxchannels = 1;
n_rates = G_N_ELEMENTS (l_rates);
rates = l_rates;
break;
}
default:
break;
}