Revision 414425e0 libavcodec/amr.c

View differences:

libavcodec/amr.c
86 86
#include "amr_float/interf_enc.h"
87 87
#endif
88 88

  
89
static const char *nb_bitrate_unsupported =
90
    "bitrate not supported: use one of 4.75k, 5.15k, 5.9k, 6.7k, 7.4k, 7.95k, 10.2k or 12.2k\n";
91
static const char *wb_bitrate_unsupported =
92
    "bitrate not supported: use one of 6.6k, 8.85k, 12.65k, 14.25k, 15.85k, 18.25k, 19.85k, 23.05k, or 23.85k\n";
93

  
89 94
/* Common code for fixed and float version*/
90 95
typedef struct AMR_bitrates
91 96
{
......
217 222

  
218 223
    if((s->enc_bitrate=getBitrateMode(avctx->bit_rate))<0)
219 224
    {
220
        av_log(avctx, AV_LOG_ERROR, "bitrate not supported\n");
225
        av_log(avctx, AV_LOG_ERROR, nb_bitrate_unsupported);
221 226
        return -1;
222 227
    }
223 228

  
......
414 419

  
415 420
    if((s->enc_bitrate=getBitrateMode(avctx->bit_rate))<0)
416 421
    {
417
        av_log(avctx, AV_LOG_ERROR, "bitrate not supported\n");
422
        av_log(avctx, AV_LOG_ERROR, nb_bitrate_unsupported);
418 423
        return -1;
419 424
    }
420 425

  
......
475 480

  
476 481
    if((s->enc_bitrate=getBitrateMode(avctx->bit_rate))<0)
477 482
    {
478
        av_log(avctx, AV_LOG_ERROR, "bitrate not supported\n");
483
        av_log(avctx, AV_LOG_ERROR, nb_bitrate_unsupported);
479 484
        return -1;
480 485
    }
481 486

  
......
591 596

  
592 597
    if((s->mode=getWBBitrateMode(avctx->bit_rate))<0)
593 598
    {
594
        av_log(avctx, AV_LOG_ERROR, "bitrate not supported\n");
599
        av_log(avctx, AV_LOG_ERROR, wb_bitrate_unsupported);
595 600
        return -1;
596 601
    }
597 602

  
......
622 627

  
623 628
    if((s->mode=getWBBitrateMode(avctx->bit_rate))<0)
624 629
    {
625
        av_log(avctx, AV_LOG_ERROR, "bitrate not supported\n");
630
        av_log(avctx, AV_LOG_ERROR, wb_bitrate_unsupported);
626 631
        return -1;
627 632
    }
628 633
    size = E_IF_encode(s->state, s->mode, data, frame, s->allow_dtx);

Also available in: Unified diff