Skip to content
This repository was archived by the owner on Jun 4, 2023. It is now read-only.

Commit ca8882f

Browse files
FernetMentalrusak
authored andcommitted
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: xbmc/xbmc#15704
1 parent fec4c20 commit ca8882f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libavcodec/vaapi_h264.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)
314314
H264SliceContext *sl = &h->slice_ctx[0];
315315
int ret;
316316

317+
if (pic->nb_slices == 0) {
318+
ret = AVERROR_INVALIDDATA;
319+
goto finish;
320+
}
321+
317322
ret = ff_vaapi_decode_issue(avctx, pic);
318323
if (ret < 0)
319324
goto finish;

0 commit comments

Comments
 (0)