[totem] backend: Fix duration conversion passed though GST_MESSAGE_DURATION



commit b68af0566f1dfc5b2ab3945f24104981e52e51f8
Author: Rico Tzschichholz <ricotz t-online de>
Date:   Sat Aug 25 20:51:29 2012 +0200

    backend: Fix duration conversion passed though GST_MESSAGE_DURATION
    
    The duration is passed in nano-seconds from gstreamer to convert
    it corretly using GST_MSECOND

 src/backend/bacon-video-widget.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index cca9bbd..1b5fd43 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -2071,7 +2071,7 @@ bvw_bus_message_cb (GstBus * bus, GstMessage * message, BaconVideoWidget *bvw)
       gst_message_parse_duration (message, &fmt, &duration);
       if (fmt == GST_FORMAT_TIME &&
 	  duration != (gint64) GST_CLOCK_TIME_NONE) {
-	bvw->priv->stream_length = duration / 1000;
+	bvw->priv->stream_length = duration / GST_MSECOND;
 	GST_DEBUG ("got new stream length %" G_GINT64_FORMAT, bvw->priv->stream_length);
       }
       break;



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