From e5abbe0440784a38c856f7b311fdb3869763a409 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Thu, 13 Oct 2011 17:08:13 -0400 Subject: [PATCH] display: destroy display on creation failure. This allows element to detect that the display creation has actually failed. Signed-off-by: Gwenole Beauchesne --- gst-libs/gst/vaapi/gstvaapidisplay.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.c b/gst-libs/gst/vaapi/gstvaapidisplay.c index fe2bc30..ea0780d 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay.c +++ b/gst-libs/gst/vaapi/gstvaapidisplay.c @@ -503,7 +503,8 @@ gst_vaapi_display_constructed(GObject *object) GObjectClass *parent_class; display->priv->create_display = display->priv->display == NULL; - gst_vaapi_display_create(display); + if (!gst_vaapi_display_create(display)) + gst_vaapi_display_destroy(display); parent_class = G_OBJECT_CLASS(gst_vaapi_display_parent_class); if (parent_class->constructed) -- 2.7.4