Fix regression introduced with commit 69fcc09 which doesn't honor reconnect_at_eof and breaks support for live/endless streams. For such streams we should reconnect at EOF and clients set the reconnect_at_eof option to signal this.
Signed-off-by: Radoslav Gerganov <rgerga...@gmail.com> --- libavformat/http.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index ec60bc0b17..27f8b98744 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -1988,12 +1988,13 @@ static int64_t http_seek_internal(URLContext *h, int64_t off, int whence, int fo if (s->off && h->is_streamed) return AVERROR(ENOSYS); - /* do not try to make a new connection if seeking past the end of the file */ - if (s->end_off || s->filesize != UINT64_MAX) { - uint64_t end_pos = s->end_off ? s->end_off : s->filesize; - if (s->off >= end_pos) - return s->off; - } + if (!s->reconnect_at_eof) + /* do not try to make a new connection if seeking past the end of the file */ + if (s->end_off || s->filesize != UINT64_MAX) { + uint64_t end_pos = s->end_off ? s->end_off : s->filesize; + if (s->off >= end_pos) + return s->off; + } /* if the location changed (redirect), revert to the original uri */ if (strcmp(s->uri, s->location)) { -- 2.25.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".