From 816e9156235a5d7d895b09c0235c9f8f1f7703e7 Mon Sep 17 00:00:00 2001
From: xbmc <fernetmenta@online.de>
Date: Sat, 26 Jan 2019 19:48:35 +0100
Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices
---
libavcodec/vaapi_h264.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)
H264SliceContext *sl = &h->slice_ctx[0];
int ret;
+ if (pic->nb_slices == 0) {
+ ret = -1;
+ goto finish;
+ }
+
ret = ff_vaapi_decode_issue(avctx, pic);
if (ret < 0)
goto finish;
--
2.19.1