When seeking through MBAFF-coded H264, this can happen. Decoding calls end_frame without calling start_frame. We are unable to decode this, as no frame state has been set. Happens for both VAAPI and Vulkan. Could be an issue elsewhere, hence the individual commit.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -508,10 +508,14 @@ static int vk_h264_end_frame(AVCodecContext *avctx) · 507 unmodified lines | ||
| 508 | 508 | const H264Context *h = avctx->priv_data; |
| 509 | 509 | H264Picture *pic = h->cur_pic_ptr; |
| 510 | 510 | H264VulkanDecodePicture *hp = pic->hwaccel_picture_private; |
| 511 | + FFVulkanDecodeContext *dec = avctx->internal->hwaccel_priv_data; | |
| 511 | 512 | FFVulkanDecodePicture *vp = &hp->vp; |
| 512 | 513 | FFVulkanDecodePicture *rvp[H264_MAX_PICTURE_COUNT] = { 0 }; |
| 513 | 514 | AVFrame *rav[H264_MAX_PICTURE_COUNT] = { 0 }; |
| 514 | 515 | |
| 516 | + if (!dec->session_params) | |
| 517 | + return AVERROR(EINVAL); | |
| 518 | + | |
| 515 | 519 | for (int i = 0; i < vp->decode_info.referenceSlotCount; i++) { |
| 516 | 520 | H264Picture *rp = hp->ref_src[i]; |
| 517 | 521 | H264VulkanDecodePicture *rhp = rp->hwaccel_picture_private; |