summaryrefslogtreecommitdiff
path: root/clutter-gst
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2013-07-26 15:00:19 +0100
committerLionel Landwerlin <llandwerlin@gmail.com>2013-07-26 15:03:28 +0100
commit3d281ed0181612a07013d86c233d2efd72688e91 (patch)
treea023c104ed13184857b038a8a2e046fbc782c20a /clutter-gst
parent6da189586164e8b79f3789e6a6df208e13b47fbd (diff)
downloadclutter-gst-3d281ed0181612a07013d86c233d2efd72688e91.tar.gz
content: use new Cogl API to know if a sink is ready
https://bugzilla.gnome.org/show_bug.cgi?id=704853
Diffstat (limited to 'clutter-gst')
-rw-r--r--clutter-gst/clutter-gst-content.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/clutter-gst/clutter-gst-content.c b/clutter-gst/clutter-gst-content.c
index ce9cb19..71546b3 100644
--- a/clutter-gst/clutter-gst-content.c
+++ b/clutter-gst/clutter-gst-content.c
@@ -181,17 +181,18 @@ content_set_sink (ClutterGstContent *self,
if (sink)
{
- CoglPipeline *pipeline;
-
priv->sink = g_object_ref_sink (sink);
g_signal_connect (priv->sink, "new-frame",
G_CALLBACK (_new_frame_from_pipeline), self);
g_signal_connect (priv->sink, "notify::pixel-aspect-ratio",
G_CALLBACK (_pixel_aspect_ratio_changed), self);
- pipeline = cogl_gst_video_sink_get_pipeline (priv->sink);
- if (pipeline)
- update_frame (self, pipeline);
+ if (cogl_gst_video_sink_is_ready (priv->sink))
+ {
+ CoglPipeline *pipeline = cogl_gst_video_sink_get_pipeline (priv->sink);
+ if (pipeline)
+ update_frame (self, pipeline);
+ }
}
g_object_notify (G_OBJECT (self), "video-sink");