mp3enc: downgrade some errors in writing Xing frame to warnings

Also clarify the meaning of the log message.
This commit is contained in:
Reimar Döffinger 2012-09-09 20:39:40 +02:00 committed by Anton Khirnov
parent 3b4bb19e63
commit 6365e4db79
1 changed files with 5 additions and 2 deletions

View File

@ -110,14 +110,17 @@ static void mp3_write_xing(AVFormatContext *s)
break;
}
if (i == FF_ARRAY_ELEMS(avpriv_mpa_freq_tab)) {
av_log(s, AV_LOG_ERROR, "Unsupported sample rate.\n");
av_log(s, AV_LOG_WARNING, "Unsupported sample rate, not writing Xing "
"header.\n");
return;
}
switch (codec->channels) {
case 1: channels = MPA_MONO; break;
case 2: channels = MPA_STEREO; break;
default: av_log(s, AV_LOG_ERROR, "Unsupported number of channels.\n"); return;
default: av_log(s, AV_LOG_WARNING, "Unsupported number of channels, "
"not writing Xing header.\n");
return;
}
/* dummy MPEG audio header */