From 1c35920d85e424b3f65aa6df1dbde689dd6ec007 Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Wed, 25 Mar 2015 10:47:45 +0900 Subject: commit BSP v1.8.0 Signed-off-by: Nobuhiro Iwamatsu --- ...ix-a-memory-leak-caused-by-invoking-gst_p.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 common/recipes-multimedia/gstreamer/gst-plugins-good/0031-videocrop-fix-a-memory-leak-caused-by-invoking-gst_p.patch (limited to 'common/recipes-multimedia/gstreamer/gst-plugins-good/0031-videocrop-fix-a-memory-leak-caused-by-invoking-gst_p.patch') diff --git a/common/recipes-multimedia/gstreamer/gst-plugins-good/0031-videocrop-fix-a-memory-leak-caused-by-invoking-gst_p.patch b/common/recipes-multimedia/gstreamer/gst-plugins-good/0031-videocrop-fix-a-memory-leak-caused-by-invoking-gst_p.patch new file mode 100644 index 0000000..248f8f7 --- /dev/null +++ b/common/recipes-multimedia/gstreamer/gst-plugins-good/0031-videocrop-fix-a-memory-leak-caused-by-invoking-gst_p.patch @@ -0,0 +1,39 @@ +From d152c33c21eba3b9df2918fb8187ff5f839f766f Mon Sep 17 00:00:00 2001 +From: Kazunori Kobayashi +Date: Tue, 22 Jan 2013 18:40:28 +0900 +Subject: [PATCH 31/31] videocrop: fix a memory leak caused by invoking + gst_pad_get_peer() + +Once is_query_done is set to TRUE, the function exits without decreasing +the reference count of a GstPad instance. +To fix the issue, this patch moves the call to gst_pad_get_peer() (which +increases the GstPad refence count) to after is_query_done is tested. +--- + gst/videocrop/gstvideocrop.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c +index 2114dae..49edc6e 100644 +--- a/gst/videocrop/gstvideocrop.c ++++ b/gst/videocrop/gstvideocrop.c +@@ -873,7 +873,7 @@ static gboolean + gst_video_crop_query_stride_supported (GstVideoCrop * vcrop) + { + static gboolean result = FALSE; +- GstPad *peer = gst_pad_get_peer (GST_BASE_TRANSFORM (vcrop)->srcpad); ++ GstPad *peer; + GstStructure *structure; + GstQuery *query; + static gboolean is_query_done = FALSE; +@@ -881,6 +881,8 @@ gst_video_crop_query_stride_supported (GstVideoCrop * vcrop) + if (is_query_done) + return result; + ++ peer = gst_pad_get_peer (GST_BASE_TRANSFORM (vcrop)->srcpad); ++ + structure = gst_structure_empty_new ("GstQueryStrideSupported"); + gst_structure_set (structure, "stride-supported", G_TYPE_BOOLEAN, FALSE, + NULL); +-- +1.7.9.5 + -- cgit 1.2.3-korg