[Ffmpeg-cvslog] r8857 - trunk/libavcodec/mpegaudio.c
alex
subversion
Sun Apr 29 15:25:32 CEST 2007
Author: alex
Date: Sun Apr 29 15:25:32 2007
New Revision: 8857
Log:
check for channels<=0 and print a reasonable error message
Modified:
trunk/libavcodec/mpegaudio.c
Modified: trunk/libavcodec/mpegaudio.c
==============================================================================
--- trunk/libavcodec/mpegaudio.c (original)
+++ trunk/libavcodec/mpegaudio.c Sun Apr 29 15:25:32 2007
@@ -70,8 +70,10 @@ static int MPA_encode_init(AVCodecContex
int i, v, table;
float a;
- if (channels > 2)
+ if (channels <= 0 || channels > 2){
+ av_log(avctx, AV_LOG_ERROR, "encoding %d channel(s) is not allowed in mp2\n", channels);
return -1;
+ }
bitrate = bitrate / 1000;
s->nb_channels = channels;
s->freq = freq;
More information about the ffmpeg-cvslog
mailing list