summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2012-12-12 17:01:28 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2012-12-14 16:07:34 +0100
commite48d4d1d1af3e77625fcbfd07a26dfebd62850fb (patch)
treed187d2618b4bbed37e3df36df1ba733c028b5f82
parentf6f10ccb0c1009cbe3bfd9a877818771ebc88eb1 (diff)
avcodec: set bits_per_coded_sample for G726
Use the bitrate and the samplerate to set the bits_per_coded_sample for G726 because the decoder needs this.
-rw-r--r--ext/libav/gstavcodecmap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c
index 10b310e..7b28800 100644
--- a/ext/libav/gstavcodecmap.c
+++ b/ext/libav/gstavcodecmap.c
@@ -2608,6 +2608,11 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
/* QCELP is always mono, no matter what the caps say */
context->channels = 1;
break;
+ case CODEC_ID_ADPCM_G726:
+ if (context->sample_rate && context->bit_rate)
+ context->bits_per_coded_sample =
+ context->bit_rate / context->sample_rate;
+ break;
default:
break;
}