[FFmpeg-devel] [PATCH 2/4] lavc/qsvdec: check ff_decode_frame_props() return value

Anton Khirnov anton at khirnov.net
Thu Jan 5 13:07:54 EET 2023


---
 libavcodec/qsvdec.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 92bfea196e..6bc85116ad 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -128,7 +128,9 @@ static int qsv_get_continuous_buffer(AVCodecContext *avctx, AVFrame *frame,
 {
     int ret = 0;
 
-    ff_decode_frame_props(avctx, frame);
+    ret = ff_decode_frame_props(avctx, frame);
+    if (ret < 0)
+        return ret;
 
     frame->width       = avctx->width;
     frame->height      = avctx->height;
-- 
2.35.1



More information about the ffmpeg-devel mailing list