Revision aca49077 libavcodec/g726.c

View differences:

libavcodec/g726.c
324 324
    AVG726Context* c = (AVG726Context*)avctx->priv_data;
325 325
    unsigned int index= (avctx->bit_rate + avctx->sample_rate/2) / avctx->sample_rate - 2;
326 326

  
327
    if (
328
        (avctx->bit_rate != 16000 && avctx->bit_rate != 24000 &&
329
         avctx->bit_rate != 32000 && avctx->bit_rate != 40000)) {
330
        av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n");
331
        return -1;
332
    }
333
    if (avctx->sample_rate != 8000 && avctx->strict_std_compliance>FF_COMPLIANCE_INOFFICIAL) {
334
        av_log(avctx, AV_LOG_ERROR, "G726: unsupported audio format\n");
327
    if (avctx->bit_rate % avctx->sample_rate && avctx->codec->encode) {
328
        av_log(avctx, AV_LOG_ERROR, "Bitrate - Samplerate combination is invalid\n");
335 329
        return -1;
336 330
    }
337 331
    if(avctx->channels != 1){

Also available in: Unified diff