[totem] backend: Fix error reporting when setting rate fails



commit 36c0dddeff86276d3dff43f40e1fae33cede42ce
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Mar 14 16:37:57 2016 +0100

    backend: Fix error reporting when setting rate fails
    
    And change the limits. We want to allow 0.5 to 2.0 rates, inclusive.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=417141

 src/backend/bacon-video-widget.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index c4f107e..4413571 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -6271,10 +6271,10 @@ bacon_video_widget_set_rate (BaconVideoWidget *bvw,
   g_return_val_if_fail (GST_IS_ELEMENT (bvw->priv->play), FALSE);
 
   /* set upper and lower limit for rate */
-  if (new_rate <= 0.5)
-       return TRUE;
-  if (new_rate >= 2.0)
-       return TRUE;
+  if (new_rate < 0.5)
+    return retval;
+  if (new_rate > 2.0)
+    return retval;
 
   if (gst_element_query_position (bvw->priv->play, GST_FORMAT_TIME, &cur)) {
     GST_DEBUG ("Setting new rate at %"G_GINT64_FORMAT"", cur);


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