mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 13:32:29 +00:00
plugins: fix memory leaks through GstVideoMeta maps.
When GstVideoMeta maps were used, the supporting functions incorrectly used gst_buffer_get_memory() instead of gst_buffer_peek_memory(), thus always increasing the associated GstMemory reference count and giving zero chance to actually release that, and subsequently the VA display.
This commit is contained in:
parent
9ab6037847
commit
84b3f84925
1 changed files with 2 additions and 2 deletions
|
@ -123,7 +123,7 @@ gst_video_meta_map_vaapi_memory(GstVideoMeta *meta, guint plane,
|
|||
GstMapInfo *info, gpointer *data, gint *stride, GstMapFlags flags)
|
||||
{
|
||||
GstVaapiVideoMemory * const mem =
|
||||
GST_VAAPI_VIDEO_MEMORY_CAST(gst_buffer_get_memory(meta->buffer, 0));
|
||||
GST_VAAPI_VIDEO_MEMORY_CAST(gst_buffer_peek_memory(meta->buffer, 0));
|
||||
|
||||
g_return_val_if_fail(mem, FALSE);
|
||||
g_return_val_if_fail(GST_VAAPI_IS_VIDEO_ALLOCATOR(mem->parent_instance.
|
||||
|
@ -196,7 +196,7 @@ gst_video_meta_unmap_vaapi_memory(GstVideoMeta *meta, guint plane,
|
|||
GstMapInfo *info)
|
||||
{
|
||||
GstVaapiVideoMemory * const mem =
|
||||
GST_VAAPI_VIDEO_MEMORY_CAST(gst_buffer_get_memory(meta->buffer, 0));
|
||||
GST_VAAPI_VIDEO_MEMORY_CAST(gst_buffer_peek_memory(meta->buffer, 0));
|
||||
|
||||
g_return_val_if_fail(mem, FALSE);
|
||||
g_return_val_if_fail(GST_VAAPI_IS_VIDEO_ALLOCATOR(mem->parent_instance.
|
||||
|
|
Loading…
Reference in a new issue