[FFmpeg-cvslog] mp3enc: downgrade some errors in writing Xing frame to warnings

Reimar Döffinger git at videolan.org
Sun Sep 16 14:29:19 CEST 2012


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Sun Sep  9 20:39:40 2012 +0200| [6365e4db79cc1a8c2c153e73828e922962d1086e] | committer: Anton Khirnov

mp3enc: downgrade some errors in writing Xing frame to warnings

Also clarify the meaning of the log message.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6365e4db79cc1a8c2c153e73828e922962d1086e
---

 libavformat/mp3enc.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index fac39d9..602071c 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -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 */



More information about the ffmpeg-cvslog mailing list