ffmpeg | branch: master | David Rosca <now...@gmail.com> | Mon May 13 09:38:49 
2024 +0200| [f7a1453f27583c36a3417c4a731b45ac4235b660] | committer: Haihao Xiang

lavc/vaapi_decode: Reject decoding of frames with no slices

Matches other hwaccels.

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

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

diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
index 21b273cd0f..7f2fe032db 100644
--- a/libavcodec/vaapi_decode.c
+++ b/libavcodec/vaapi_decode.c
@@ -156,6 +156,11 @@ int ff_vaapi_decode_issue(AVCodecContext *avctx,
     VAStatus vas;
     int err;
 
+    if (pic->nb_slices <= 0) {
+        err = AVERROR(EINVAL);
+        goto fail;
+    }
+
     av_log(avctx, AV_LOG_DEBUG, "Decode to surface %#x.\n",
            pic->output_surface);
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to