From c91d72e6775dc11ade653b232a5a5b51aa48d5c0 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Wed, 14 Sep 2022 00:58:37 +0900 Subject: [PATCH] nvdec: Fix for HEVC decoding when coded resolution is larger than display resolution As documented in the SDK header, we should set coded width/height values to the corresponding decoder configuration option, instead of display resolution Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1438 Part-of: --- subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c index ae473a9..ff73773 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstnvdec.c @@ -546,8 +546,8 @@ parser_sequence_callback (GstNvDec * nvdec, CUVIDEOFORMAT * format) } GST_DEBUG_OBJECT (nvdec, "creating decoder"); - create_info.ulWidth = width; - create_info.ulHeight = height; + create_info.ulWidth = format->coded_width; + create_info.ulHeight = format->coded_height; create_info.ulNumDecodeSurfaces = nvdec->num_decode_surface; create_info.CodecType = format->codec; create_info.ChromaFormat = format->chroma_format; -- 2.7.4