Revision f1b163e0

View differences:

libavcodec/utils.c
1306 1306

  
1307 1307
int av_get_bits_per_sample(enum CodecID codec_id){
1308 1308
    switch(codec_id){
1309
    case CODEC_ID_ADPCM_CT:
1310 1309
    case CODEC_ID_ADPCM_SBPRO_2:
1310
        return 2;
1311 1311
    case CODEC_ID_ADPCM_SBPRO_3:
1312
        return 3;
1312 1313
    case CODEC_ID_ADPCM_SBPRO_4:
1313
        return 0;
1314
    case CODEC_ID_ADPCM_CT:
1315
        return 4;
1314 1316
    case CODEC_ID_PCM_ALAW:
1315 1317
    case CODEC_ID_PCM_MULAW:
1316 1318
    case CODEC_ID_PCM_S8:
libavformat/utils.c
658 658
        if (bits_per_sample) {
659 659
            if (enc->channels == 0)
660 660
                return -1;
661
            frame_size = size / ((bits_per_sample >> 3) * enc->channels);
661
            frame_size = (size << 3) / (bits_per_sample * enc->channels);
662 662
        } else {
663 663
            /* used for example by ADPCM codecs */
664 664
            if (enc->bit_rate == 0)

Also available in: Unified diff