h264dec: mark remaining frames as unreference before exec_picture_refs_modification

8.2.4.2 required this. Some clips will crash if we do not fill the reference list like this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/376>
This commit is contained in:
Xu Guangxin 2020-08-06 12:51:27 +08:00
parent 55769a16c7
commit 34b1d195b7

View file

@ -3099,8 +3099,6 @@ init_picture_refs (GstVaapiDecoderH264 * decoder,
break;
}
ret = ret && exec_picture_refs_modification (decoder, picture, slice_hdr);
switch (slice_hdr->type % 5) {
case GST_H264_B_SLICE:
num_refs = 1 + slice_hdr->num_ref_idx_l1_active_minus1;
@ -3120,6 +3118,8 @@ init_picture_refs (GstVaapiDecoderH264 * decoder,
break;
}
ret = ret && exec_picture_refs_modification (decoder, picture, slice_hdr);
mark_picture_refs (decoder, picture);
return ret;