Commit 51b0e812 authored by Jun Zhao's avatar 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: 's avatarJun Zhao <barryjzhao@tencent.com>
parent 165eabf1
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "formats.h" #include "formats.h"
#include "internal.h" #include "internal.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavformat/avio.h" #include "libavformat/avio.h"
#include "libswscale/swscale.h" #include "libswscale/swscale.h"
#include "dnn_interface.h" #include "dnn_interface.h"
...@@ -205,7 +206,9 @@ static int config_props(AVFilterLink *inlink) ...@@ -205,7 +206,9 @@ static int config_props(AVFilterLink *inlink)
sws_dst_w = AV_CEIL_RSHIFT(sws_dst_w, 2); sws_dst_w = AV_CEIL_RSHIFT(sws_dst_w, 2);
break; break;
default: 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); return AVERROR(EIO);
} }
sr_context->sws_contexts[0] = sws_getContext(sws_src_w, sws_src_h, AV_PIX_FMT_GRAY8, sr_context->sws_contexts[0] = sws_getContext(sws_src_w, sws_src_h, AV_PIX_FMT_GRAY8,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment