From 7e3fb629b442ff51ed33f833f63ef8dfc34d068d Mon Sep 17 00:00:00 2001 From: maroy Date: Wed, 22 Jun 2005 14:52:02 +0000 Subject: [PATCH] added workaround for time measurement in the autoplug test --- livesupport/modules/gstreamerElements/src/AutoplugTest.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/livesupport/modules/gstreamerElements/src/AutoplugTest.cxx b/livesupport/modules/gstreamerElements/src/AutoplugTest.cxx index 64993f7db..ffa8215cb 100644 --- a/livesupport/modules/gstreamerElements/src/AutoplugTest.cxx +++ b/livesupport/modules/gstreamerElements/src/AutoplugTest.cxx @@ -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/AutoplugTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -123,8 +123,10 @@ AutoplugTest :: playFile(const char * audioFile) // iterate until playTo is reached while (gst_bin_iterate(GST_BIN(pipeline))); + /* query the decoder, as for some reason, the sink will return + * unreal numbers */ format = GST_FORMAT_TIME; - gst_element_query(sink, GST_QUERY_POSITION, &format, &timePlayed); + gst_element_query(decoder, GST_QUERY_POSITION, &format, &timePlayed); /* clean up nicely */ gst_element_set_state(pipeline, GST_STATE_NULL);