On Tue,  9 Jan 2018 09:15:39 +0100
Martin Herkt <lach...@srsfckn.biz> wrote:

> This reportedly fixes hangs with segmented streams.
> Affects playback via Schannel on Windows in particular.
> 
> Can be reproduced with any YouTube live stream.
> ---
>  libavformat/avio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/avio.c b/libavformat/avio.c
> index 63e82872f7..cd1e325a6b 100644
> --- a/libavformat/avio.c
> +++ b/libavformat/avio.c
> @@ -393,7 +393,7 @@ static inline int retry_transfer_wrapper(URLContext *h, 
> uint8_t *buf,
>              }
>          } else if (ret == AVERROR_EOF)
>              return (len > 0) ? len : AVERROR_EOF;
> -        else if (ret < 0)
> +        else if (ret <= 0)
>              return ret;
>          if (ret) {
>              fast_retries = FFMAX(fast_retries, 2);

This was explicitly changed with the EOF change (that broke a lot of
stuff), so this is probably not correct. The intention is very much to
retry if the result is 0.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to