mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
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.
This commit is contained in:
parent
b58a224cd1
commit
0ba1bac264
2 changed files with 14 additions and 3 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
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)) {
|
||||
|
|
Loading…
Reference in a new issue