summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-12-18 13:45:03 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-12-18 13:45:03 +0000
commit7910d13474cf2f0a396519192c56c73f2f7043ed (patch)
tree903785db509e16da310891587360102108780822
parent9110a0e32d5eb421558145459e2a1fcc9720c170 (diff)
always print message when error, AV_LOG_DEBUG -> AV_LOG_ERROR
Originally committed as revision 7330 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/amr.c40
1 files changed, 8 insertions, 32 deletions
diff --git a/libavcodec/amr.c b/libavcodec/amr.c
index 2d1877b222..b19346e3d8 100644
--- a/libavcodec/amr.c
+++ b/libavcodec/amr.c
@@ -186,19 +186,13 @@ static int amr_nb_encode_init(AVCodecContext * avctx)
if(avctx->sample_rate!=8000)
{
- if(avctx->debug)
- {
- av_log(avctx, AV_LOG_DEBUG, "Only 8000Hz sample rate supported\n");
- }
+ av_log(avctx, AV_LOG_ERROR, "Only 8000Hz sample rate supported\n");
return -1;
}
if(avctx->channels!=1)
{
- if(avctx->debug)
- {
- av_log(avctx, AV_LOG_DEBUG, "Only mono supported\n");
- }
+ av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
return -1;
}
@@ -207,10 +201,7 @@ static int amr_nb_encode_init(AVCodecContext * avctx)
if(Speech_Encode_Frame_init(&s->enstate, 0, "encoder") || sid_sync_init (&s->sidstate))
{
- if(avctx->debug)
- {
- av_log(avctx, AV_LOG_DEBUG, "Speech_Encode_Frame_init error\n");
- }
+ av_log(avctx, AV_LOG_ERROR, "Speech_Encode_Frame_init error\n");
return -1;
}
@@ -392,19 +383,13 @@ static int amr_nb_encode_init(AVCodecContext * avctx)
if(avctx->sample_rate!=8000)
{
- if(avctx->debug)
- {
- av_log(avctx, AV_LOG_DEBUG, "Only 8000Hz sample rate supported\n");
- }
+ av_log(avctx, AV_LOG_ERROR, "Only 8000Hz sample rate supported\n");
return -1;
}
if(avctx->channels!=1)
{
- if(avctx->debug)
- {
- av_log(avctx, AV_LOG_DEBUG, "Only mono supported\n");
- }
+ av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
return -1;
}
@@ -414,10 +399,7 @@ static int amr_nb_encode_init(AVCodecContext * avctx)
s->enstate=Encoder_Interface_init(0);
if(!s->enstate)
{
- if(avctx->debug)
- {
- av_log(avctx, AV_LOG_DEBUG, "Encoder_Interface_init error\n");
- }
+ av_log(avctx, AV_LOG_ERROR, "Encoder_Interface_init error\n");
return -1;
}
@@ -587,19 +569,13 @@ static int amr_wb_encode_init(AVCodecContext * avctx)
if(avctx->sample_rate!=16000)
{
- if(avctx->debug)
- {
- av_log(avctx, AV_LOG_DEBUG, "Only 16000Hz sample rate supported\n");
- }
+ av_log(avctx, AV_LOG_ERROR, "Only 16000Hz sample rate supported\n");
return -1;
}
if(avctx->channels!=1)
{
- if(avctx->debug)
- {
- av_log(avctx, AV_LOG_DEBUG, "Only mono supported\n");
- }
+ av_log(avctx, AV_LOG_ERROR, "Only mono supported\n");
return -1;
}