[libav-commits] mp3enc: downgrade some errors in writing Xing frame to warnings

Reimar Döffinger git at libav.org
Sat Sep 15 18:29:14 CEST 2012


Module: libav
Branch: master
Commit: 6365e4db79cc1a8c2c153e73828e922962d1086e

Author:    Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Committer: Anton Khirnov <anton at khirnov.net>
Date:      Sun Sep  9 20:39:40 2012 +0200

mp3enc: downgrade some errors in writing Xing frame to warnings

Also clarify the meaning of the log message.

---

 libavformat/mp3enc.c |    7 +++++--
 1 files 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 libav-commits mailing list