mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
dashdemux: Don't use ABS() for calculating differences
We know which number is bigger.
This commit is contained in:
parent
7778e8293a
commit
0cc777b3b0
1 changed files with 1 additions and 2 deletions
|
@ -1295,8 +1295,7 @@ gst_dash_demux_stream_sidx_seek (GstDashDemuxStream * dashstream,
|
|||
* snapping */
|
||||
if ((flags & GST_SEEK_FLAG_SNAP_NEAREST) == GST_SEEK_FLAG_SNAP_NEAREST) {
|
||||
if (idx + 1 < sidx->entries_count
|
||||
&& ABS (sidx->entries[idx + 1].pts - ts) <
|
||||
ABS (sidx->entries[idx].pts - ts))
|
||||
&& sidx->entries[idx + 1].pts - ts < ts - sidx->entries[idx].pts)
|
||||
idx += 1;
|
||||
} else if ((forward && (flags & GST_SEEK_FLAG_SNAP_AFTER)) || (!forward
|
||||
&& (flags & GST_SEEK_FLAG_SNAP_BEFORE))) {
|
||||
|
|
Loading…
Reference in a new issue