aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/fifo.h
diff options
context:
space:
mode:
authorAnssi Hannula <anssi.hannula@iki.fi>2016-07-26 15:18:40 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-06 03:43:42 +0200
commit456cf87de934e9fff6bd5f070c050062384a1d8f (patch)
treeed1cb335209b3760ac07ad48c5acf6d5fd196633 /libavutil/fifo.h
parent54d48c8e901d849908ff09774d19043106f64157 (diff)
downloadffmpeg-456cf87de934e9fff6bd5f070c050062384a1d8f.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. (cherry picked from commit 9cb30f7a880578e995becbd8bf9ffb69788e09a2) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/fifo.h')
0 files changed, 0 insertions, 0 deletions