cudacompositor: Fix memory leak

gst_cuda_compositor_upload_frame() returns buffers with increased
refcount already

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8335>
This commit is contained in:
Seungha Yang 2025-01-22 19:37:02 +09:00 committed by GStreamer Marge Bot
parent 9b578abe15
commit dc81abe9ee

View file

@ -663,10 +663,10 @@ gst_cuda_compositor_pad_prepare_frame (GstVideoAggregatorPad * pad,
&pad->info, buffer, (GstMapFlags) (GST_MAP_READ | GST_MAP_CUDA))) { &pad->info, buffer, (GstMapFlags) (GST_MAP_READ | GST_MAP_CUDA))) {
GST_ERROR_OBJECT (self, "Couldn't map frame"); GST_ERROR_OBJECT (self, "Couldn't map frame");
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
return FALSE;
} }
prepared_frame->buffer = buffer; priv->prepared_buf = buffer;
priv->prepared_buf = gst_buffer_ref (buffer);
return TRUE; return TRUE;
} }