mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-29 18:48:44 +00:00
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.
This commit is contained in:
parent
f7d3a5f60b
commit
baf6486f6c
2 changed files with 9 additions and 5 deletions
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue