mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-19 20:46:22 +00:00
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.
This commit is contained in:
parent
3837abb264
commit
60ff639cd4
1 changed files with 5 additions and 0 deletions
|
@ -2916,6 +2916,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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue