va: decoder: Also ref the display when duplicating pictures.

The _destroy_buffers() will check the display handle using the
g_return_val_if_fail. we should not generate the invalid pointer
warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1368>
This commit is contained in:
He Junyan 2021-11-19 19:02:20 +08:00 committed by GStreamer Marge Bot
parent 53391d2b8d
commit c2bffe22f3

View file

@ -846,6 +846,7 @@ gst_va_decode_picture_dup (GstVaDecodePicture * pic)
dup = g_slice_new0 (GstVaDecodePicture);
dup->display = gst_object_ref (pic->display);
/* dups only need gstbuffer */
dup->gstbuffer = gst_buffer_ref (pic->gstbuffer);
return dup;