summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudio.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-07-14 02:53:42 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-07-14 02:53:42 +0000
commitbb0b93ba8114ed792163de956ccc1bd8f954e609 (patch)
tree6ae236f4c182f0ea3fcb1b5cd53191c0bf38bbc5 /libavcodec/mpegaudio.c
parent28f88dc8267eee3ab9857743b7675a516216e0a8 (diff)
downloadffmpeg-bb0b93ba8114ed792163de956ccc1bd8f954e609.tar.gz
more info about why init failed
Originally committed as revision 3312 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegaudio.c')
-rw-r--r--libavcodec/mpegaudio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/mpegaudio.c b/libavcodec/mpegaudio.c
index fe79baa1d2..ac773865ec 100644
--- a/libavcodec/mpegaudio.c
+++ b/libavcodec/mpegaudio.c
@@ -87,8 +87,10 @@ static int MPA_encode_init(AVCodecContext *avctx)
break;
}
}
- if (i == 3)
+ if (i == 3){
+ av_log(avctx, AV_LOG_ERROR, "Sampling rate %d is not allowed in mp2\n", freq);
return -1;
+ }
s->freq_index = i;
/* encoding bitrate & frequency */
@@ -96,8 +98,10 @@ static int MPA_encode_init(AVCodecContext *avctx)
if (mpa_bitrate_tab[s->lsf][1][i] == bitrate)
break;
}
- if (i == 15)
+ if (i == 15){
+ av_log(avctx, AV_LOG_ERROR, "bitrate %d is not allowed in mp2\n", bitrate);
return -1;
+ }
s->bitrate_index = i;
/* compute total header size & pad bit */