From 1881d1826a5862a6aedb63726a97ed0e0127177c Mon Sep 17 00:00:00 2001 From: He Junyan Date: Fri, 4 Nov 2022 21:52:39 +0800 Subject: [PATCH] va: baseenc: Do not import the VA surface from other display. Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1167 Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c b/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c index 7a10381..1f61246 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvabaseenc.c @@ -238,7 +238,8 @@ _try_import_buffer (GstVaBaseEnc * base, GstBuffer * inbuf) /* The VA buffer. */ surface = gst_va_buffer_get_surface (inbuf); - if (surface != VA_INVALID_ID) + if (surface != VA_INVALID_ID && + (gst_va_buffer_peek_display (inbuf) == base->display)) return TRUE; /* TODO: DMA buffer. */ -- 2.7.4