Revision 868f2f4d libavcodec/vmdav.c

View differences:

libavcodec/vmdav.c
484 484
//    if (silence)
485 485
//        av_log(s->avctx, AV_LOG_INFO, "silent block!\n");
486 486

  
487
        if (silence) {
488
            memset(data, 0, data_size * 2);
489
        } else {
490
            if (s->bits == 16)
491
                vmdaudio_decode_audio(s, data, buf, data_size, s->channels == 2);
492
            else {
493
                /* copy the data but convert it to signed */
494
                for (i = 0; i < data_size; i++){
495
                    *data++ = buf[i] + 0x80;
496
                    *data++ = buf[i] + 0x80;
497
                }
487
    if (silence) {
488
        memset(data, 0, data_size * 2);
489
    } else {
490
        if (s->bits == 16)
491
            vmdaudio_decode_audio(s, data, buf, data_size, s->channels == 2);
492
        else {
493
            /* copy the data but convert it to signed */
494
            for (i = 0; i < data_size; i++){
495
                *data++ = buf[i] + 0x80;
496
                *data++ = buf[i] + 0x80;
498 497
            }
499 498
        }
499
    }
500 500

  
501 501
    return data_size * 2;
502 502
}

Also available in: Unified diff