[FFmpeg-cvslog] logging: downgrade recoverable errors to warnings

Stefan Kost git
Wed Feb 9 04:00:10 CET 2011


ffmpeg | branch: master | Stefan Kost <ensonic at users.sf.net> | Tue Feb  8 14:16:49 2011 +0200| [3e2a4e91bdc1c88927a68f6025b1877530d102f1] | committer: Michael Niedermayer

logging: downgrade recoverable errors to warnings

In all 3 cases, the decoding continues and thus a warning would be sufficient.
Helps application that catch them with own log handers to handle them
accordingly.

Signed-off-by: Mans Rullgard <mans at mansr.com>
(cherry picked from commit ae2104791ffa8466d3f6972ed0793b2a165daabe)

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

 libavcodec/mpeg4videodec.c |    4 ++--
 libavcodec/vc1.c           |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 5303da3..673c4e8 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -2071,7 +2071,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
      /* detect buggy encoders which don't set the low_delay flag (divx4/xvid/opendivx)*/
      // note we cannot detect divx5 without b-frames easily (although it's buggy too)
      if(s->vo_type==0 && s->vol_control_parameters==0 && s->divx_version==-1 && s->picture_number==0){
-         av_log(s->avctx, AV_LOG_ERROR, "looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag\n");
+         av_log(s->avctx, AV_LOG_WARNING, "looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag\n");
          s->low_delay=1;
      }
 
@@ -2110,7 +2110,7 @@ int ff_mpeg4_decode_picture_header(MpegEncContext * s, GetBitContext *gb)
     for(;;) {
         if(get_bits_count(gb) >= gb->size_in_bits){
             if(gb->size_in_bits==8 && (s->divx_version>=0 || s->xvid_build>=0)){
-                av_log(s->avctx, AV_LOG_ERROR, "frame skip %d\n", gb->size_in_bits);
+                av_log(s->avctx, AV_LOG_WARNING, "frame skip %d\n", gb->size_in_bits);
                 return FRAME_SKIPPED; //divx bug
             }else
                 return -1; //end of stream
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 86904cb..1f39878 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -293,7 +293,7 @@ int vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitConte
     v->profile = get_bits(gb, 2);
     if (v->profile == PROFILE_COMPLEX)
     {
-        av_log(avctx, AV_LOG_ERROR, "WMV3 Complex Profile is not fully supported\n");
+        av_log(avctx, AV_LOG_WARNING, "WMV3 Complex Profile is not fully supported\n");
     }
 
     if (v->profile == PROFILE_ADVANCED)




More information about the ffmpeg-cvslog mailing list