[FFmpeg-devel] [PATCH] make av_get_packet return AVERROR_EOF if appropriate
Reimar Döffinger
Reimar.Doeffinger
Fri Oct 2 09:13:00 CEST 2009
On Fri, Oct 02, 2009 at 09:07:32AM +0200, Reimar D?ffinger wrote:
> On Thu, Oct 01, 2009 at 11:32:41PM +0200, Michael Niedermayer wrote:
> > On Thu, Oct 01, 2009 at 10:21:04PM +0200, Reimar D?ffinger wrote:
> > > On Thu, Oct 01, 2009 at 09:20:54PM +0200, Michael Niedermayer wrote:
> > > > On Thu, Oct 01, 2009 at 07:15:06PM +0200, Reimar D?ffinger wrote:
> > > > > I propose this change to get_buffer:
> > > > > Index: libavformat/aviobuf.c
> > > > > ===================================================================
> > > > > --- libavformat/aviobuf.c (revision 20105)
> > > > > +++ libavformat/aviobuf.c (working copy)
> > > > > @@ -415,6 +415,8 @@
> > > > > size -= len;
> > > > > }
> > > > > }
> > > > > + if (size1 == size && url_feof(s))
> > > > > + return AVERROR_EOF;
> > > > > return size1 - size;
> > > > > }
> > > > >
> > > >
> > > > this would return EOF even if EIO happened
> > > > url_ferror() should maybe be considered or eof not set in case of other
> > > > errors
> > >
> > > I wasn't even aware of url_ferror. Seems preferable to me to make those
> > > errors available as return value when possible.
> > > I admit it isn't great but I have the impression that currently almost
> > > nothing takes care of url_ferror, so that should at least be a slight
> > > improvement.
> >
> > patch looks good (assuming reg tests pass)
>
> Except for the verified-correct changes (aiff and au) they do.
> All applied.
Something went wrong when testing, according to FATE a few more tests
change. Those changes that are visible are correct, but I still need to
figure out why I don't get the same changes (make test passes for me).
More information about the ffmpeg-devel
mailing list