[Pkg-gstreamer-commits] [gstreamer-vaapi] 33/176: plugins: fix memory leaks through GstVideoMeta maps.

Vincent Cheng vcheng at moszumanska.debian.org
Tue Jun 3 08:09:25 UTC 2014


This is an automated email from the git hooks/post-receive script.

vcheng pushed a commit to branch upstream
in repository gstreamer-vaapi.

commit 84b3f84925cc3d12eb949a283534e3d1e0761902
Author: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
Date:   Thu Nov 28 19:08:28 2013 +0100

    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.
---
 gst/vaapi/gstvaapivideomemory.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gst/vaapi/gstvaapivideomemory.c b/gst/vaapi/gstvaapivideomemory.c
index 0e3b794..cb953c1 100644
--- a/gst/vaapi/gstvaapivideomemory.c
+++ b/gst/vaapi/gstvaapivideomemory.c
@@ -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.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gstreamer/gstreamer-vaapi.git



More information about the Pkg-gstreamer-commits mailing list