[FFmpeg-devel] [PATCH 8/9] avcodec/cuvid: add format mismatch debug logs

wm4 nfxjfg at googlemail.com
Fri Feb 10 14:35:40 EET 2017


From: Timo Rothenpieler <timo at rothenpieler.org>

---
 libavcodec/cuvid.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/cuvid.c b/libavcodec/cuvid.c
index 9b35476f2a..6091d81d3b 100644
--- a/libavcodec/cuvid.c
+++ b/libavcodec/cuvid.c
@@ -193,6 +193,11 @@ static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT* form
             hwframe_ctx->format != AV_PIX_FMT_CUDA ||
             hwframe_ctx->sw_format != avctx->sw_pix_fmt)) {
         av_log(avctx, AV_LOG_ERROR, "AVHWFramesContext is already initialized with incompatible parameters\n");
+        av_log(avctx, AV_LOG_DEBUG, "width: %d <-> %d\n", hwframe_ctx->width, avctx->width);
+        av_log(avctx, AV_LOG_DEBUG, "height: %d <-> %d\n", hwframe_ctx->height, avctx->height);
+        av_log(avctx, AV_LOG_DEBUG, "format: %s <-> cuda\n", av_get_pix_fmt_name(hwframe_ctx->format));
+        av_log(avctx, AV_LOG_DEBUG, "sw_format: %s <-> %s\n",
+               av_get_pix_fmt_name(hwframe_ctx->sw_format), av_get_pix_fmt_name(avctx->sw_pix_fmt));
         ctx->internal_error = AVERROR(EINVAL);
         return 0;
     }
-- 
2.11.0



More information about the ffmpeg-devel mailing list