[clutter-gst] ClutterGstVideoTexture: don't crash if we can't get autocluttersink



commit 1df53639f9cb36e127963d0a2518d753ac7c1868
Author: Tomas Frydrych <tomas sleepfive com>
Date:   Thu May 24 08:32:17 2012 +0100

    ClutterGstVideoTexture: don't crash if we can't get autocluttersink

 clutter-gst/clutter-gst-video-texture.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/clutter-gst/clutter-gst-video-texture.c b/clutter-gst/clutter-gst-video-texture.c
index 8a9e3af..7cd9114 100644
--- a/clutter-gst/clutter-gst-video-texture.c
+++ b/clutter-gst/clutter-gst-video-texture.c
@@ -555,6 +555,12 @@ setup_pipeline (ClutterGstVideoTexture *video_texture)
     }
 
   video_sink = gst_element_factory_make ("autocluttersink", NULL);
+  if (!video_sink)
+    {
+      g_critical ("Unable to get autocluttersink");
+      return FALSE;
+    }
+
   g_signal_connect (video_sink,
 		    "element-added",
 		    G_CALLBACK (on_autocluttersink_element_added),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]