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

Commit

Permalink
avcodec/vaapi_h264: skip decode if pic has no slices
Browse files Browse the repository at this point in the history
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
  • Loading branch information
FernetMenta authored and Rechi committed Dec 31, 2019
1 parent bd83f16 commit 2c6b3f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libavcodec/vaapi_h264.c
Expand Up @@ -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;
Expand Down

0 comments on commit 2c6b3f3

Please sign in to comment.