aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorAnssi Hannula <anssi.hannula@iki.fi>2016-07-26 15:18:40 +0300
committerAnssi Hannula <anssi.hannula@iki.fi>2016-07-28 01:24:57 +0300
commit9cb30f7a880578e995becbd8bf9ffb69788e09a2 (patch)
treebd1870d11b636cc3cf1363fd712b5ebf277421b7 /libavutil
parent60873bf992eab1d3bad8dd0fd11336363d44854d (diff)
downloadffmpeg-9cb30f7a880578e995becbd8bf9ffb69788e09a2.tar.gz
avformat/hls: Fix regression with ranged media segments
Commit 81306fd4bdf ("hls: eliminate ffurl_* usage", merged in d0fc5de3a6) changed the hls demuxer to use AVIOContext instead of URLContext for its HTTP requests. HLS demuxer uses the "offset" option of the http demuxer, requesting the initial file offset for the I/O (http URLProtocol uses the "Range:" HTTP header to try to accommodate that). However, the code in libavformat/aviobuf.c seems to be doing its own accounting for the current file offset (AVIOContext.pos), with the assumption that the initial offset is always zero. HLS demuxer does an explicit seek after open_url to account for cases where the "offset" was not effective (due to the URL being a local file or the HTTP server not obeying it), which should be a no-op in case the file offset is already at that position. However, since aviobuf.c code thinks the starting offset is 0, this doesn't work properly. This breaks retrieval of ranged media segments. To fix the regression, just drop the seek call from the HLS demuxer when the HTTP(S) protocol is used.
Diffstat (limited to 'libavutil')
0 files changed, 0 insertions, 0 deletions