libs: decoder: h264: Add ref flags for splited field.

When split one frame into fields, the second field should also
copy the reference flags.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/333>
This commit is contained in:
He Junyan 2020-05-26 02:19:15 +08:00 committed by GStreamer Merge Bot
parent 593f6650ef
commit 3df1018b02

View file

@ -397,6 +397,9 @@ gst_vaapi_frame_store_split_fields (GstVaapiFrameStore * fs, gboolean tff)
second_field = gst_vaapi_picture_h264_new_field (first_field);
if (!second_field)
return FALSE;
gst_vaapi_picture_h264_set_reference (second_field,
GST_VAAPI_PICTURE_FLAGS (first_field) & GST_VAAPI_PICTURE_FLAGS_REFERENCE,
FALSE);
gst_vaapi_picture_replace (&fs->buffers[fs->num_buffers++], second_field);
gst_vaapi_picture_unref (second_field);