summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXu Guangxin <guangxin.xu@intel.com>2020-08-06 12:51:27 +0800
committerXu Guangxin <guangxin.xu@intel.com>2020-08-06 14:13:56 +0800
commit34b1d195b7360fba6d70adb12072f1d25d377c8a (patch)
tree0a1e26fdb463b703335449f6bb7c54e7e25e82b2
parent55769a16c769511e870444c0bb9b29e982bab0e2 (diff)
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>
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h264.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
index 7dd7ed7f..fd57a3f0 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
@@ -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;