summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@hotmail.com>2020-05-26 02:19:15 +0800
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-05-26 07:40:26 +0000
commit3df1018b023e9368036b024e0ce80570258eeb33 (patch)
treeb3292a11c969cd6df13f28aa4025a941c65e4be9 /gst-libs
parent593f6650ef0ca751a28ca2631405efaa7bec11a5 (diff)
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>
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_h264.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
index fad3d0e8..43955cd2 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_h264.c
@@ -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);