[FFmpeg-devel] [PATCH 4/4] Make file_open() return the error code set in errno if open() fails, rather than alwasy ENOENT.
Stefano Sabatini
stefano.sabatini-lala
Wed Apr 28 00:15:55 CEST 2010
On date Tuesday 2010-04-27 16:32:12 +0200, V?ctor Paesa encoded:
> Hi,
>
> On Tue, Apr 27, 2010 at 00:38, Stefano Sabatini wrote:
> > On date Monday 2010-04-26 23:49:08 +0200, Michael Niedermayer encoded:
> >> On Mon, Apr 26, 2010 at 11:40:02PM +0200, Stefano Sabatini wrote:
> >> > On date Monday 2010-04-26 01:16:39 +0200, Stefano Sabatini encoded:
> >> > > ---
> >> > > ?libavformat/file.c | ? ?2 +-
> >> > > ?1 files changed, 1 insertions(+), 1 deletions(-)
> >> > >
> >> > > diff --git a/libavformat/file.c b/libavformat/file.c
> >> > > index d42a678..8873d5f 100644
> >> > > --- a/libavformat/file.c
> >> > > +++ b/libavformat/file.c
> >> > > @@ -53,7 +53,7 @@ static int file_open(URLContext *h, const char *filename, int flags)
> >> > > ?#endif
> >> > > ? ? ?fd = open(filename, access, 0666);
> >> > > ? ? ?if (fd == -1)
> >> > > - ? ? ? ?return AVERROR(ENOENT);
> >> > > + ? ? ? ?return AVERROR(errno);
> >> > > ? ? ?h->priv_data = (void *) (intptr_t) fd;
> >> > > ? ? ?return 0;
> >> > > ?}
> >> >
> >> > Ping.
> >>
> >> it does look ok, i hope it wont have the sideeffects of your last
> >> errno patch (issue1894)
> >
> > Applied.
> >
> > Sadly issue1894 is due to Cygwin not implement strerror_r(), and we
> > having dropped the explicit printing of the description for ENOENT,
> > since we're assuming it will be managed by strerror_r().
>
> I have not compiled SVN-r22960 yet, but the issue must be other, as even
> old Cygwin 1.5.x implements strerror_r():
>
> $ fgrep -r strerror_r /usr/include
> /usr/include/cygwin/version.h: 71: Export strerror_r
> /usr/include/string.h:char *_EXFUN(strerror_r,(int, char *, size_t));
>
> $ uname -a
> CYGWIN_NT-5.1 localhost 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin
Please could you check and report, it may be that he compiled against
a very old version and / or forgot to re-configure after updating
FFmpeg.
Regards.
--
FFmpeg = Foolish and Fierce Mastering Picky Evanescent Gadget
More information about the ffmpeg-devel
mailing list