From c2bffe22f36a917c2df341f01066095310be6d50 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Fri, 19 Nov 2021 19:02:20 +0800 Subject: [PATCH] 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: --- subprojects/gst-plugins-bad/sys/va/gstvadecoder.c | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvadecoder.c b/subprojects/gst-plugins-bad/sys/va/gstvadecoder.c index a88c3d27ab..973b4dc025 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvadecoder.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvadecoder.c @@ -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;