[FFmpeg-devel] [PATCH] avformat/http: Return an error in case of prematurely ending data

Michael Niedermayer michaelni at gmx.at
Sun Apr 19 14:50:09 CEST 2015


On Sun, Apr 19, 2015 at 02:17:09PM +0200, wm4 wrote:
> On Sun, 29 Mar 2015 00:33:35 +0100
> Michael Niedermayer <michaelni at gmx.at> wrote:
> 
> > Fixes Ticket 4039
> > 
> > Signed-off-by: Michael Niedermayer <michaelni at 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.

fixed, hopefully

thnaks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150419/ec99fd6e/attachment.asc>


More information about the ffmpeg-devel mailing list