[SCM] libav/experimental: Make ffmpeg warns the user when the selected sample format is ignored.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:22:59 UTC 2013


The following commit has been merged in the experimental branch:
commit fa34a3626cf1aa19acbe9f8c6fcddb6c3eb8eaa1
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date:   Fri Jan 14 15:50:55 2011 +0100

    Make ffmpeg warns the user when the selected sample format is ignored.
    
    Signed-off-by: Mans Rullgard <mans at mansr.com>

diff --git a/ffmpeg.c b/ffmpeg.c
index 691b73e..df89018 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -600,8 +600,14 @@ static void choose_sample_fmt(AVStream *st, AVCodec *codec)
             if(*p == st->codec->sample_fmt)
                 break;
         }
-        if(*p == -1)
+        if (*p == -1) {
+            av_log(NULL, AV_LOG_WARNING,
+                   "Incompatible sample format '%s' for codec '%s', auto-selecting format '%s'\n",
+                   av_get_sample_fmt_name(st->codec->sample_fmt),
+                   codec->name,
+                   av_get_sample_fmt_name(codec->sample_fmts[0]));
             st->codec->sample_fmt = codec->sample_fmts[0];
+        }
     }
 }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list