diff options
author | Jonathan Matthew <jonathan@kaolin.wh9.net> | 2006-12-11 09:51:17 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2006-12-11 09:51:17 +0000 |
commit | baf6486f6c9682f246207e5adb3a4363e1aad2a1 (patch) | |
tree | 69e57e661a8b3acbb0c50f538db4355f4aac7079 /gst/modplug | |
parent | f7d3a5f60b3094c100c2f7c131149cf951367e8e (diff) | |
download | gst-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/modplug')
-rw-r--r-- | gst/modplug/gstmodplug.cc | 7 |
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; } |