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;
config_failed:
{
GST_DEBUG_OBJECT (bsink, "failed setting config");
+ gst_object_unref (pool);
return FALSE;
}
}
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;
config_failed:
{
GST_DEBUG_OBJECT (bsink, "failed setting config");
+ gst_object_unref (pool);
return FALSE;
}
}