mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
sys: fix some bufferpool leaks
This commit is contained in:
parent
c003efcc63
commit
f35f0b6548
2 changed files with 8 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue