[vlc-commits] Fixed support of G726.
Laurent Aimar
git at videolan.org
Wed May 23 22:01:56 CEST 2012
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat May 12 20:59:35 2012 +0200| [59ae308b755d365655dca9ccccf9b738b1415f5f] | committer: Laurent Aimar
Fixed support of G726.
The bit per samples must be exact for the avcodec decoder.
It closes #6799.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=59ae308b755d365655dca9ccccf9b738b1415f5f
---
modules/codec/avcodec/avcodec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/codec/avcodec/avcodec.c b/modules/codec/avcodec/avcodec.c
index 4eefc71..d91793f 100644
--- a/modules/codec/avcodec/avcodec.c
+++ b/modules/codec/avcodec/avcodec.c
@@ -463,6 +463,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();
More information about the vlc-commits
mailing list