[Ffmpeg-cvslog] r5666 - in trunk: libavcodec/utils.c libavformat/utils.c
aurel
subversion
Sat Jul 8 09:14:01 CEST 2006
Author: aurel
Date: Sat Jul 8 09:14:00 2006
New Revision: 5666
Modified:
trunk/libavcodec/utils.c
trunk/libavformat/utils.c
Log:
set proper bits_per_sample value for ADPCM codecs
Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c (original)
+++ trunk/libavcodec/utils.c Sat Jul 8 09:14:00 2006
@@ -1306,11 +1306,13 @@
int av_get_bits_per_sample(enum CodecID codec_id){
switch(codec_id){
- case CODEC_ID_ADPCM_CT:
case CODEC_ID_ADPCM_SBPRO_2:
+ return 2;
case CODEC_ID_ADPCM_SBPRO_3:
+ return 3;
case CODEC_ID_ADPCM_SBPRO_4:
- return 0;
+ case CODEC_ID_ADPCM_CT:
+ return 4;
case CODEC_ID_PCM_ALAW:
case CODEC_ID_PCM_MULAW:
case CODEC_ID_PCM_S8:
Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c (original)
+++ trunk/libavformat/utils.c Sat Jul 8 09:14:00 2006
@@ -658,7 +658,7 @@
if (bits_per_sample) {
if (enc->channels == 0)
return -1;
- frame_size = size / ((bits_per_sample >> 3) * enc->channels);
+ frame_size = (size << 3) / (bits_per_sample * enc->channels);
} else {
/* used for example by ADPCM codecs */
if (enc->bit_rate == 0)
More information about the ffmpeg-cvslog
mailing list