mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 15:38:53 +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 */
|
* snapping */
|
||||||
if ((flags & GST_SEEK_FLAG_SNAP_NEAREST) == GST_SEEK_FLAG_SNAP_NEAREST) {
|
if ((flags & GST_SEEK_FLAG_SNAP_NEAREST) == GST_SEEK_FLAG_SNAP_NEAREST) {
|
||||||
if (idx + 1 < sidx->entries_count
|
if (idx + 1 < sidx->entries_count
|
||||||
&& ABS (sidx->entries[idx + 1].pts - ts) <
|
&& sidx->entries[idx + 1].pts - ts < ts - sidx->entries[idx].pts)
|
||||||
ABS (sidx->entries[idx].pts - ts))
|
|
||||||
idx += 1;
|
idx += 1;
|
||||||
} else if ((forward && (flags & GST_SEEK_FLAG_SNAP_AFTER)) || (!forward
|
} else if ((forward && (flags & GST_SEEK_FLAG_SNAP_AFTER)) || (!forward
|
||||||
&& (flags & GST_SEEK_FLAG_SNAP_BEFORE))) {
|
&& (flags & GST_SEEK_FLAG_SNAP_BEFORE))) {
|
||||||
|
|
Loading…
Reference in a new issue