mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
vulkan_decode: reject decoding of frames with no slices
As per the spec: VUID-VkVideoDecodeH264PictureInfoKHR-sliceCount-arraylength sliceCount must be greater than 0 VUID-VkVideoDecodeH265PictureInfoKHR-sliceSegmentCount-arraylength sliceSegmentCount must be greater than 0 This particularly happens with seeking in field-coded H264.
This commit is contained in:
parent
4ff303a7b8
commit
997d8a7e73
@ -535,6 +535,9 @@ static int vk_av1_end_frame(AVCodecContext *avctx)
|
||||
FFVulkanDecodePicture *rvp[AV1_NUM_REF_FRAMES] = { 0 };
|
||||
AVFrame *rav[AV1_NUM_REF_FRAMES] = { 0 };
|
||||
|
||||
if (!ap->tile_list.nb_tiles)
|
||||
return 0;
|
||||
|
||||
if (!dec->session_params) {
|
||||
int err = vk_av1_create_params(avctx, &dec->session_params);
|
||||
if (err < 0)
|
||||
|
@ -517,6 +517,9 @@ static int vk_h264_end_frame(AVCodecContext *avctx)
|
||||
FFVulkanDecodePicture *rvp[H264_MAX_PICTURE_COUNT] = { 0 };
|
||||
AVFrame *rav[H264_MAX_PICTURE_COUNT] = { 0 };
|
||||
|
||||
if (!hp->h264_pic_info.sliceCount)
|
||||
return 0;
|
||||
|
||||
if (!dec->session_params) {
|
||||
int err = vk_h264_create_params(avctx, &dec->session_params);
|
||||
if (err < 0)
|
||||
|
@ -901,6 +901,9 @@ static int vk_hevc_end_frame(AVCodecContext *avctx)
|
||||
FFVulkanDecodePicture *rvp[HEVC_MAX_REFS] = { 0 };
|
||||
AVFrame *rav[HEVC_MAX_REFS] = { 0 };
|
||||
|
||||
if (!hp->h265_pic_info.sliceSegmentCount)
|
||||
return 0;
|
||||
|
||||
if (!dec->session_params) {
|
||||
const HEVCSPS *sps = h->ps.sps;
|
||||
const HEVCPPS *pps = h->ps.pps;
|
||||
|
Loading…
x
Reference in New Issue
Block a user