Commit 0ba1bac2 authored by Sebastien Moutte's avatar Sebastien Moutte
Browse files

gst/matroska/matroska-demux.c: Fix a bad conversion using...

gst/matroska/matroska-demux.c: Fix a bad conversion using gst_guint64_to_gdouble. fabs ((gdouble) demux->index[entry]...

Original commit message from CVS:
* gst/matroska/matroska-demux.c: (gst_matroskademux_do_index_seek):
Fix a bad conversion using gst_guint64_to_gdouble.
fabs ((gdouble) demux->index[entry].time - (gdouble) seek_pos) can not be
replaced by fabs (gst_guint64_to_gdouble (demux->index[entry].time - seek_pos)) as the
difference could be negative. fabs (gst_guint64_to_gdouble (demux->index[entry].time) -
gst_guint64_to_gdouble (seek_pos)) is the good solution. Thanks to Tim who has seen my
mistake.
parent b58a224c
2006-04-23 Sebastien Moutte <sebastien@moutte.net>
* gst/matroska/matroska-demux.c: (gst_matroskademux_do_index_seek):
Fix a bad conversion using gst_guint64_to_gdouble.
fabs ((gdouble) demux->index[entry].time - (gdouble) seek_pos) can not be
replaced by fabs (gst_guint64_to_gdouble (demux->index[entry].time - seek_pos)) as the
difference could be negative. fabs (gst_guint64_to_gdouble (demux->index[entry].time) -
gst_guint64_to_gdouble (seek_pos)) is the good solution. Thanks to Tim who has seen my
mistake.
2006-04-21 Sebastien Moutte <sebastien@moutte.net>
* gst/matroska/matroska-demux.c: (gst_matroskademux_do_index_seek):
......
......@@ -1043,9 +1043,10 @@ gst_matroskademux_do_index_seek (GstMatroskaDemux * demux, gint64 seek_pos,
for (n = 0; n < demux->num_indexes; ++n) {
gdouble d_entry, d_this;
d_entry =
fabs (gst_guint64_to_gdouble (demux->index[entry].time - seek_pos));
d_this = fabs (gst_guint64_to_gdouble (demux->index[n].time - seek_pos));
d_entry = fabs (gst_guint64_to_gdouble (demux->index[entry].time) -
gst_guint64_to_gdouble (seek_pos));
d_this = fabs (gst_guint64_to_gdouble (demux->index[n].time) -
gst_guint64_to_gdouble (seek_pos));
if (d_this < d_entry &&
(demux->index[n].time < segment_stop || segment_stop == -1)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment