[totem] backend: Fix "time to play until the end" when we seeked



commit 12d188e51abcdae3ce6ba50b7b6011b1927d9a10
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jul 18 16:11:33 2012 +0100

    backend: Fix "time to play until the end" when we seeked
    
    We were only ever checking the stream length, not the actual time
    left to play until the end of the stream when download buffering.

 src/backend/bacon-video-widget.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index a2b7ef2..5fb38ad 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -1855,11 +1855,11 @@ bvw_download_buffering_done (BaconVideoWidget *bvw)
     return TRUE;
   }
 
-  if (bvw->priv->buffering_left * BUFFERING_LEFT_RATIO < bvw->priv->stream_length) {
+  if (bvw->priv->buffering_left * BUFFERING_LEFT_RATIO < bvw->priv->stream_length - bvw->priv->current_time) {
     GST_DEBUG ("Buffering left: %lld * %f = %lld < %lld",
 	       bvw->priv->buffering_left, BUFFERING_LEFT_RATIO,
 	       bvw->priv->buffering_left * BUFFERING_LEFT_RATIO,
-	       bvw->priv->stream_length);
+	       bvw->priv->stream_length - bvw->priv->current_time);
     return TRUE;
   }
   return FALSE;



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