diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c index 8a11d5da50..662aba8c57 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c @@ -1377,7 +1377,7 @@ gst_hls_media_playlist_seek (GstHLSMediaPlaylist * playlist, gboolean forward, } } } else if (part->stream_time <= ts - && ts < part->stream_time + part->duration) { + && ts < (GstClockTimeDiff) (part->stream_time + part->duration)) { res = cand; if (!want_keyunit || part->independent) res_part_idx = part_idx; @@ -1413,7 +1413,7 @@ gst_hls_media_playlist_seek (GstHLSMediaPlaylist * playlist, gboolean forward, goto out; } } else if ((cand->stream_time <= ts || idx == 0) - && ts < cand->stream_time + cand->duration) { + && ts < (GstClockTimeDiff) (cand->stream_time + cand->duration)) { res = cand; goto out; } @@ -1477,8 +1477,8 @@ gst_hls_media_playlist_find_partial_position (GstHLSMediaPlaylist * playlist, /* If the target timestamp is before this partial segment, or in the first half, this * is the partial segment to land in */ - if (cand->stream_time + (cand->duration / 2) >= ts && - cand->stream_time <= ts + (cand->duration / 2)) { + if ((GstClockTimeDiff) (cand->stream_time + (cand->duration / 2)) >= ts && + cand->stream_time <= (GstClockTimeDiff) (ts + (cand->duration / 2))) { GST_DEBUG ("choosing partial segment %d", part_idx); seek_result->segment = gst_m3u8_media_segment_ref (seg); seek_result->found_partial_segment = TRUE; @@ -1537,7 +1537,7 @@ gst_hls_media_playlist_find_position (GstHLSMediaPlaylist * playlist, /* If the target stream time is definitely past the end * of this segment, no earlier segment (with lower stream time) * could match, so we fail */ - if (ts >= cand->stream_time + (3 * cand->duration / 2)) { + if (ts >= (GstClockTimeDiff) (cand->stream_time + (3 * cand->duration / 2))) { break; }