From 02bce13c9ebfc99738aac577cd244365ba018e2e Mon Sep 17 00:00:00 2001 From: maroy Date: Sat, 2 Jul 2005 19:45:15 +0000 Subject: [PATCH] changed played time reporting to be based on the sink --- livesupport/modules/gstreamerElements/src/play.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/livesupport/modules/gstreamerElements/src/play.c b/livesupport/modules/gstreamerElements/src/play.c index d4c737ae9..6f8fe1073 100644 --- a/livesupport/modules/gstreamerElements/src/play.c +++ b/livesupport/modules/gstreamerElements/src/play.c @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/gstreamerElements/src/play.c,v $ ------------------------------------------------------------------------------*/ @@ -110,10 +110,8 @@ main(int argc, // iterate until playTo is reached while (gst_bin_iterate(GST_BIN(pipeline))); - /* FIXME: query the decoder, as for some reason, the sink will return - * unreal numbers, when playing back mp3s only! */ format = GST_FORMAT_TIME; - gst_element_query(decoder, GST_QUERY_POSITION, &format, &timePlayed); + gst_element_query(sink, GST_QUERY_POSITION, &format, &timePlayed); g_print("time played: %" G_GINT64_FORMAT " ns\n", timePlayed);