amfencoder: Do shared resource copy only if texture belongs to other device
authorSeungha Yang <seungha@centricular.com>
Tue, 12 Apr 2022 16:39:43 +0000 (01:39 +0900)
committerSeungha Yang <seungha@centricular.com>
Tue, 12 Apr 2022 16:42:34 +0000 (01:42 +0900)
Staging texture from the same d3d11device can be copied without
shared resource handling

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2165>

subprojects/gst-plugins-bad/sys/amfcodec/gstamfencoder.cpp

index fd1484938dbd453a6b673022b03360928afecf7c..5f2c8fa1ce27bdfba4230698b2914a7d1b12fcf5 100644 (file)
@@ -781,7 +781,7 @@ gst_amf_encoder_upload_buffer (GstAmfEncoder * self, GstBuffer * buffer)
   if (desc.Usage != D3D11_USAGE_DEFAULT) {
     GST_TRACE_OBJECT (self, "Not a default usage texture, d3d11 copy");
     gst_d3d11_device_lock (priv->device);
-    ret = gst_amf_encoder_copy_d3d11 (self, buffer, TRUE);
+    ret = gst_amf_encoder_copy_d3d11 (self, buffer, FALSE);
     gst_d3d11_device_unlock (priv->device);
 
     return ret;