Commit cb1c93f7 authored by Laurent Aimar's avatar Laurent Aimar Committed by Jean-Baptiste Kempf

Fixed support of G726.

The bit per samples must be exact for the avcodec decoder.
It closes #6799.
(cherry picked from commit 59ae308b755d365655dca9ccccf9b738b1415f5f)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8d8ca1d1
......@@ -445,6 +445,11 @@ int ffmpeg_OpenCodec( decoder_t *p_dec )
p_sys->p_context->block_align = p_dec->fmt_in.audio.i_blockalign;
p_sys->p_context->bit_rate = p_dec->fmt_in.i_bitrate;
p_sys->p_context->bits_per_coded_sample = p_dec->fmt_in.audio.i_bitspersample;
if( p_sys->i_codec_id == CODEC_ID_ADPCM_G726 &&
p_sys->p_context->bit_rate > 0 &&
p_sys->p_context->sample_rate > 0)
p_sys->p_context->bits_per_coded_sample = p_sys->p_context->bit_rate /
p_sys->p_context->sample_rate;
}
int ret;
vlc_avcodec_lock();
......
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