[totem/wip/hadess/fix-playback-rate-warning: 5/5] backend: Fix warning on exit



commit 9e20d0e329e5effb5bb87b6349ab9fd6a1023974
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jan 31 16:57:17 2019 +0100

    backend: Fix warning on exit
    
    Don't try to set a new playback rate if the playback rate is already the
    same.
    
    (totem:22873): Totem-WARNING **: Failed to reset the playback rate to 1.0

 src/backend/bacon-video-widget.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index d4735f64e..7c4455b2e 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -6345,6 +6345,9 @@ bacon_video_widget_set_rate (BaconVideoWidget *bvw,
   g_return_val_if_fail (BACON_IS_VIDEO_WIDGET (bvw), FALSE);
   g_return_val_if_fail (GST_IS_ELEMENT (bvw->priv->play), FALSE);
 
+  if (new_rate == bvw->priv->rate)
+    return TRUE;
+
   /* set upper and lower limit for rate */
   if (new_rate < 0.5)
     return retval;


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