On Sun, 29 Mar 2015 00:33:35 +0100
Michael Niedermayer <michae...@gmx.at> wrote:

> Fixes Ticket 4039
> 
> Signed-off-by: Michael Niedermayer <michae...@gmx.at>
> ---
>  libavformat/http.c |    8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/libavformat/http.c b/libavformat/http.c
> index da3c9be..a1d3763 100644
> --- a/libavformat/http.c
> +++ b/libavformat/http.c
> @@ -907,6 +907,14 @@ static int http_buf_read(URLContext *h, uint8_t *buf, 
> int size)
>              s->filesize >= 0 && s->off >= s->filesize)
>              return AVERROR_EOF;
>          len = ffurl_read(s->hd, buf, size);
> +        if (!len && (!s->willclose || s->chunksize < 0) &&
> +            s->filesize >= 0 && s->off < s->filesize) {
> +            av_log(h, AV_LOG_ERROR,
> +                   "Streams ends prematurly at %"PRId64", should be 
> %"PRId64"\n",

2 typos.

> +                   s->off, s->filesize
> +                  );
> +            return AVERROR(EIO);
> +        }
>      }
>      if (len > 0) {
>          s->off += len;

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to