[goobox] player: do not stop the progress if the position query fails



commit 288ff0fcfba22c0cd7c5ed69fdc582bb6da9510f
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Mar 18 18:52:15 2013 +0100

    player: do not stop the progress if the position query fails

 src/goo-player.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/goo-player.c b/src/goo-player.c
index 98bf27f..02e3906 100644
--- a/src/goo-player.c
+++ b/src/goo-player.c
@@ -776,18 +776,16 @@ update_progress_cb (gpointer user_data)
        if (self->priv->current_track == NULL)
                return FALSE;
 
-       if (! gst_element_query_position (self->priv->pipeline,
-                                         GST_FORMAT_TIME,
-                                         &current_time))
+       if (gst_element_query_position (self->priv->pipeline,
+                                       GST_FORMAT_TIME,
+                                       &current_time))
        {
-               return FALSE;
+               g_signal_emit_by_name (G_OBJECT (self),
+                                      "progress",
+                                      (double) current_time / self->priv->current_track->time,
+                                      NULL);
        }
 
-       g_signal_emit_by_name (G_OBJECT (self),
-                              "progress",
-                              (double) current_time / self->priv->current_track->time,
-                              NULL);
-
        self->priv->update_progress_id = g_timeout_add (PROGRESS_DELAY, update_progress_cb, user_data);
 
        return FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]