diff options
author | Stefan Kost <ensonic@users.sf.net> | 2009-07-20 16:20:15 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-07-20 16:42:43 +0300 |
commit | ebc417f769bffd7eaca260eac5358f953551868c (patch) | |
tree | 5938b4a4223b786d3b107f68641e79e685bb4f3c /gst | |
parent | 51e022d2883c91feae664dbbba6d03ca81b95865 (diff) | |
download | gst-plugins-bad-ebc417f769bffd7eaca260eac5358f953551868c.tar.gz gst-plugins-bad-ebc417f769bffd7eaca260eac5358f953551868c.tar.bz2 gst-plugins-bad-ebc417f769bffd7eaca260eac5358f953551868c.zip |
fpsdisplaysink: check query return result before using it
Diffstat (limited to 'gst')
-rw-r--r-- | gst/debugutils/fpsdisplaysink.c | 5 |
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, ¤t_ts); if (GST_CLOCK_TIME_IS_VALID (self->last_ts)) { |