summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--gst/modplug/gstmodplug.cc7
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 1326084f..111a5eed 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-12-11 Wim Taymans <wim@fluendo.com>
+
+ Patch by: Jonathan Matthew <jonathan at kaolin wh9 net>).
+
+ * gst/modplug/gstmodplug.cc:
+ Fix modplug duration query. Fixes #384294.
+
2006-12-08 Wim Taymans <wim@fluendo.com>
Patch by: René Stadler <mail at renestadler de>
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;
}