Merge branch 'master' into 0.11
[platform/upstream/gstreamer.git] / gst / goom / gstgoom.c
index 7854449..c8ec9c3 100644 (file)
@@ -402,7 +402,7 @@ gst_goom_sink_event (GstPad * pad, GstEvent * event)
 static gboolean
 gst_goom_src_query (GstPad * pad, GstQuery * query)
 {
-  gboolean res;
+  gboolean res = FALSE;
   GstGoom *goom;
 
   goom = GST_GOOM (gst_pad_get_parent (pad));
@@ -417,6 +417,9 @@ gst_goom_src_query (GstPad * pad, GstQuery * query)
       GstClockTime our_latency;
       guint max_samples;
 
+      if (goom->rate == 0)
+        break;
+
       if ((res = gst_pad_peer_query (goom->sinkpad, query))) {
         gst_query_parse_latency (query, &us_live, &min_latency, &max_latency);