summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gst/debugutils/fpsdisplaysink.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/debugutils/fpsdisplaysink.c b/gst/debugutils/fpsdisplaysink.c
index 54f5cc54..ff3e0dfd 100644
--- a/gst/debugutils/fpsdisplaysink.c
+++ b/gst/debugutils/fpsdisplaysink.c
@@ -206,7 +206,10 @@ display_current_fps (gpointer data)
GstFPSDisplaySink *self = GST_FPS_DISPLAY_SINK (data);
gint64 current_ts;
- gst_element_query (self->video_sink, self->query);
+ /* if query failed try again on next timer tick */
+ if (!gst_element_query (self->video_sink, self->query))
+ return TRUE;
+
gst_query_parse_position (self->query, NULL, &current_ts);
if (GST_CLOCK_TIME_IS_VALID (self->last_ts)) {