summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorJonathan Matthew <jonathan@kaolin.wh9.net>2006-12-11 09:51:17 +0000
committerWim Taymans <wim.taymans@gmail.com>2006-12-11 09:51:17 +0000
commitbaf6486f6c9682f246207e5adb3a4363e1aad2a1 (patch)
tree69e57e661a8b3acbb0c50f538db4355f4aac7079 /gst
parentf7d3a5f60b3094c100c2f7c131149cf951367e8e (diff)
downloadgst-plugins-bad-baf6486f6c9682f246207e5adb3a4363e1aad2a1.tar.gz
gst-plugins-bad-baf6486f6c9682f246207e5adb3a4363e1aad2a1.tar.bz2
gst-plugins-bad-baf6486f6c9682f246207e5adb3a4363e1aad2a1.zip
gst/modplug/gstmodplug.cc: Fix modplug duration query. Fixes #384294.
Original commit message from CVS: Patch by: Jonathan Matthew <jonathan at kaolin wh9 net>). * gst/modplug/gstmodplug.cc: Fix modplug duration query. Fixes #384294.
Diffstat (limited to 'gst')
-rw-r--r--gst/modplug/gstmodplug.cc7
1 files changed, 2 insertions, 5 deletions
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;
}