summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2012-06-18 12:17:12 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2012-06-18 12:17:25 +0200
commitf35f0b6548eebb4dd79b37152644efc24e356d44 (patch)
tree50edf2f5448ebd24e20209cdfbc373eedecfa757 /sys
parentc003efcc63af02a7fe9e65b751ed46cc111ad1b2 (diff)
sys: fix some bufferpool leakstimestamp-audiosrc
Diffstat (limited to 'sys')
-rw-r--r--sys/ximage/ximagesink.c7
-rw-r--r--sys/xvimage/xvimagesink.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index a1e9bf023..f47e7d398 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -1459,12 +1459,12 @@ gst_ximagesink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
if (pool == NULL && need_pool) {
GstVideoInfo info;
- GST_DEBUG_OBJECT (ximagesink, "create new pool");
- pool = gst_ximage_buffer_pool_new (ximagesink);
-
if (!gst_video_info_from_caps (&info, caps))
goto invalid_caps;
+ GST_DEBUG_OBJECT (ximagesink, "create new pool");
+ pool = gst_ximage_buffer_pool_new (ximagesink);
+
/* the normal size of a frame */
size = info.size;
@@ -1499,6 +1499,7 @@ invalid_caps:
config_failed:
{
GST_DEBUG_OBJECT (bsink, "failed setting config");
+ gst_object_unref (pool);
return FALSE;
}
}
diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c
index 087ab540b..ed2f10c94 100644
--- a/sys/xvimage/xvimagesink.c
+++ b/sys/xvimage/xvimagesink.c
@@ -1970,12 +1970,12 @@ gst_xvimagesink_propose_allocation (GstBaseSink * bsink, GstQuery * query)
if (pool == NULL && need_pool) {
GstVideoInfo info;
- GST_DEBUG_OBJECT (xvimagesink, "create new pool");
- pool = gst_xvimage_buffer_pool_new (xvimagesink);
-
if (!gst_video_info_from_caps (&info, caps))
goto invalid_caps;
+ GST_DEBUG_OBJECT (xvimagesink, "create new pool");
+ pool = gst_xvimage_buffer_pool_new (xvimagesink);
+
/* the normal size of a frame */
size = info.size;
@@ -2010,6 +2010,7 @@ invalid_caps:
config_failed:
{
GST_DEBUG_OBJECT (bsink, "failed setting config");
+ gst_object_unref (pool);
return FALSE;
}
}