1
0
mirror of https://git.ffmpeg.org/ffmpeg.git synced 2026-10-24 02:09:03 +03:00
Files
Kacper Michajłow 2120a1d626 avformat/hls: fix reading byte-range segments after the first one
Seeking an input opened with the http or libcurl "offset" option to the
next segment's offset does not work, because its AVIOContext counts from
0 while the protocol seeks to file offsets, so the seek skipped as many
bytes as the request started at. A seek also cannot extend a request past
its end offset. Keep reading from the same input when the next segment
follows within the requested range, and open it with a new request
otherwise. Keep the requested end with each input, extend prefetched
requests over their run too, and reuse a connection only after its reply
was read to the end.

Only hls.c and dashdec.c pass "offset". The AVIOContext starts its
position at 0 and never learns the protocol's start offset. Initializing
the position from the protocol in ffio_fdopen would fix that for
everyone, but the crypto and cache protocols and probing with an offset
report positions in their own coordinates and break with it, so avoid
the seek here instead.

Note that external users that pass "offset" themselves see the same
thing, positions and seeks on such an input are relative to the request
start rather than to the file, and this commit only avoids the seek in
hls.c instead of fixing that accounting.

Fixes: 0616685b1e
Fixes: #25000
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
(cherry picked from commit d9242028a6)
2026-10-11 20:21:50 +02:00
..
…
2025-08-03 13:48:47 +02:00
2026-03-10 13:52:18 +01:00
…
2025-09-08 20:59:31 +00:00
2025-04-13 22:49:21 +02:00
…
…
2026-06-23 19:15:57 +02:00
2024-03-31 00:08:43 +01:00
2025-08-03 13:48:47 +02:00
…
2026-03-10 13:52:18 +01:00
2024-03-26 06:36:43 +01:00
…
…
2026-06-23 19:15:57 +02:00
2026-03-10 13:52:18 +01:00
2026-06-23 19:15:57 +02:00
…
…
2026-05-08 09:34:52 +02:00
2026-06-23 19:15:57 +02:00
2025-08-03 13:48:47 +02:00
…
2026-02-19 17:18:11 +01:00
2026-03-10 13:52:18 +01:00
2026-03-10 13:52:18 +01:00
2026-06-23 19:15:57 +02:00
…
…
2024-06-19 10:12:50 -03:00
…
2026-06-23 19:15:57 +02:00
…
2026-05-29 01:49:20 +00:00
2024-03-26 06:36:43 +01:00
2025-08-03 13:48:47 +02:00
2025-06-23 17:19:18 +10:00
2026-08-12 04:52:00 +02:00
…
…
…
…
2026-02-25 02:55:43 +00:00
2025-08-03 13:48:47 +02:00
2024-06-04 11:46:27 +02:00
2024-07-21 16:41:23 +02:00
2026-02-18 08:20:10 +00:00
…
…
…
2023-05-31 09:03:58 -07:00
…
…
…
…
2025-08-03 13:48:47 +02:00
2026-06-16 09:18:24 -03:00
2024-04-17 18:31:06 +05:30
2024-05-01 02:57:12 +02:00
2026-03-10 13:52:18 +01:00
2025-08-03 13:48:47 +02:00
2024-04-06 12:59:56 +02:00
…
2025-08-04 03:59:42 +00:00
2025-08-03 13:48:47 +02:00
2026-04-28 12:29:37 +00:00
2024-03-31 00:08:43 +01:00
…
2026-03-10 13:52:18 +01:00
2026-06-23 19:15:57 +02:00
2025-03-28 15:23:28 +01:00
…
2026-05-23 10:16:38 -05:00
2026-05-22 08:20:13 -05:00
2024-03-31 00:08:43 +01:00
2026-05-03 13:26:34 +00:00
…
2025-08-03 13:48:47 +02:00
…
2026-06-23 19:13:06 +02:00
2024-11-03 10:53:15 +11:00
2026-05-03 18:22:46 +02:00
2026-03-10 13:52:18 +01:00
…
…
…
…
…
…
2025-06-23 17:19:18 +10:00
…
2024-03-15 12:51:15 +01:00
2024-03-15 12:51:15 +01:00
…
2026-08-12 04:51:58 +02:00
2026-03-10 13:52:18 +01:00
…
…
…
…
2025-08-03 13:48:47 +02:00
2024-03-31 00:08:43 +01:00
2026-03-10 13:52:18 +01:00
2026-06-23 19:15:57 +02:00
…
…
2026-03-10 13:52:18 +01:00
…
2024-07-21 17:02:11 +02:00
…
2026-09-18 01:19:50 +02:00
…
…
…
…
2024-03-26 06:36:43 +01:00
2026-02-25 02:55:43 +00:00
2026-03-10 13:52:18 +01:00
…
2025-08-03 13:48:47 +02:00
…
…
2024-03-26 06:36:43 +01:00