Commit e5bec71f authored by michael's avatar michael

more info about why init failed


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@3312 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 33569bc5
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment