sys: fix some bufferpool leaks

This commit is contained in:
Wim Taymans 2012-06-18 12:17:12 +02:00
parent c003efcc63
commit f35f0b6548
2 changed files with 8 additions and 6 deletions

View file

@ -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;
}
}

View file

@ -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;
}
}