summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-07-20 16:20:15 +0300
committerStefan Kost <ensonic@users.sf.net>2009-07-20 16:42:43 +0300
commitebc417f769bffd7eaca260eac5358f953551868c (patch)
tree5938b4a4223b786d3b107f68641e79e685bb4f3c
parent51e022d2883c91feae664dbbba6d03ca81b95865 (diff)
fpsdisplaysink: check query return result before using it
-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 54f5cc54a..ff3e0dfd3 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)) {