mp3enc: downgrade some errors in writing Xing frame to warnings
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Sun, 9 Sep 2012 18:39:40 +0000 (20:39 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sat, 15 Sep 2012 16:25:15 +0000 (18:25 +0200)
Also clarify the meaning of the log message.

libavformat/mp3enc.c

index fac39d9..602071c 100644 (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 */