kumquat-buildroot/package/ffmpeg/0002-avcodec-vaapi_h264-skip-decode-if-pic-has-no-slices.patch
Bernd Kuhls e243ec75f3 package/ffmpeg: bump version to 4.4
Remove wavpack-related patch and configure options due to upstream
removal of wavpack support:
http://git.videolan.org/?p=ffmpeg.git;a=commit;h=45070eec4c089b06947f07e25cdb1bc8b2102553

Changelog:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=Changelog;;hb=refs/heads/release/4.4

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2021-04-09 22:53:50 +02:00

37 lines
1.2 KiB
Diff

From 2c6b3f357331e203ad87214984661c40704aceb7 Mon Sep 17 00:00:00 2001
From: Rainer Hochecker <fernetmenta@online.de>
Date: Sat, 26 Jan 2019 19:48:35 +0100
Subject: [PATCH] avcodec/vaapi_h264: skip decode if pic has no slices
This fixes / workarounds https://bugs.freedesktop.org/show_bug.cgi?id=105368.
It was hit frequently when watching h264 channels received via DVB-X.
Corresponding kodi bug: https://github.com/xbmc/xbmc/issues/15704
Downloaded from Kodi ffmpeg repo:
https://github.com/xbmc/FFmpeg/commit/2c6b3f357331e203ad87214984661c40704aceb7
Patch was sent upstream:
http://ffmpeg.org/pipermail/ffmpeg-devel/2019-March/240863.html
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
libavcodec/vaapi_h264.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
index dd2a6571604..e521a05c4ff 100644
--- a/libavcodec/vaapi_h264.c
+++ b/libavcodec/vaapi_h264.c
@@ -314,6 +314,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)
H264SliceContext *sl = &h->slice_ctx[0];
int ret;
+ if (pic->nb_slices == 0) {
+ ret = AVERROR_INVALIDDATA;
+ goto finish;
+ }
+
ret = ff_vaapi_decode_issue(avctx, pic);
if (ret < 0)
goto finish;