[FFmpeg-cvslog] lavf/sr: Dump input pixel format in error message

Jun Zhao git at videolan.org
Mon Jun 3 08:14:04 EEST 2019


ffmpeg | branch: master | Jun Zhao <barryjzhao at tencent.com> | Sat Jun  1 11:20:33 2019 +0800| [51b0e812161d737802491fa883de8878fc256020] | committer: Jun Zhao

lavf/sr: Dump input pixel format in error message

Dump input pixel format in error message, it's will help to debugging

Signed-off-by: Jun Zhao <barryjzhao at tencent.com>

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

 libavfilter/vf_sr.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c
index 86dc551553..a371e443d4 100644
--- a/libavfilter/vf_sr.c
+++ b/libavfilter/vf_sr.c
@@ -29,6 +29,7 @@
 #include "formats.h"
 #include "internal.h"
 #include "libavutil/opt.h"
+#include "libavutil/pixdesc.h"
 #include "libavformat/avio.h"
 #include "libswscale/swscale.h"
 #include "dnn_interface.h"
@@ -205,7 +206,9 @@ static int config_props(AVFilterLink *inlink)
                 sws_dst_w = AV_CEIL_RSHIFT(sws_dst_w, 2);
                 break;
             default:
-                av_log(context, AV_LOG_ERROR, "could not create SwsContext for scaling for given input pixel format");
+                av_log(context, AV_LOG_ERROR,
+                       "could not create SwsContext for scaling for given input pixel format: %s\n",
+                       av_get_pix_fmt_name(inlink->format));
                 return AVERROR(EIO);
             }
             sr_context->sws_contexts[0] = sws_getContext(sws_src_w, sws_src_h, AV_PIX_FMT_GRAY8,



More information about the ffmpeg-cvslog mailing list