From baf6486f6c9682f246207e5adb3a4363e1aad2a1 Mon Sep 17 00:00:00 2001 From: Jonathan Matthew Date: Mon, 11 Dec 2006 09:51:17 +0000 Subject: gst/modplug/gstmodplug.cc: Fix modplug duration query. Fixes #384294. Original commit message from CVS: Patch by: Jonathan Matthew ). * gst/modplug/gstmodplug.cc: Fix modplug duration query. Fixes #384294. --- gst/modplug/gstmodplug.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gst/modplug') diff --git a/gst/modplug/gstmodplug.cc b/gst/modplug/gstmodplug.cc index ebde342e..bc31b4a4 100644 --- a/gst/modplug/gstmodplug.cc +++ b/gst/modplug/gstmodplug.cc @@ -317,13 +317,10 @@ gst_modplug_src_query (GstPad * pad, GstQuery * query) gst_query_parse_position (query, &format, NULL); if (format == GST_FORMAT_TIME) { - gfloat fpos; gint64 pos; - fpos = ((float) (modplug->song_length * - modplug->mSoundFile->GetCurrentPos ()) / - (float) modplug->mSoundFile->GetMaxPosition ()); - pos = (gint64) (fpos * GST_SECOND); + pos = (modplug->song_length * modplug->mSoundFile->GetCurrentPos ()); + pos /= modplug->mSoundFile->GetMaxPosition (); gst_query_set_position (query, format, pos); res = TRUE; } -- cgit v1.2.1