[FFmpeg-devel] [PATCH] Binary file access on Windows

Michael Niedermayer michaelni
Mon Jun 25 21:33:54 CEST 2007


Hi

On Mon, Jun 25, 2007 at 01:30:45PM -0300, Ramiro Ribeiro Polla wrote:
> M?ns Rullg?rd wrote:
> > Ramiro Ribeiro Polla <ramiro at lisha.ufsc.br> writes:
> >
> >   
> >> wrote:
> >>     
> >>> Ramiro Ribeiro Polla <ramiro at lisha.ufsc.br> writes:
> >>>
> >>>
> >>>       
> >>>> Hello,
> >>>>
> >>>> Attached patch checks for features, and not systems, on the code. It's
> >>>> now left up to configure.
> >>>>
> >>>>         
> >>>       
> >>>> -#if defined(__MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__)
> >>>> +#ifdef CONFIG_BINARY_FILE
> >>>>      access |= O_BINARY;
> >>>>  #endif
> >>>>
> >>>>         
> >>> #ifdef O_BINARY ?
> >>>
> >>>       
> >> Patch attached.
> >> Are there any systems that define O_BINARY but don't require it?
> >>     
> >
> > Doesn't matter.  It should never do any harm.
> >
> >   
> >> Ramiro Polla
> >> Index: libavformat/file.c
> >> ===================================================================
> >> --- libavformat/file.c	(revision 9389)
> >> +++ libavformat/file.c	(working copy)
> >> @@ -40,7 +40,7 @@
> >>      } else {
> >>          access = O_RDONLY;
> >>      }
> >> -#if defined(__MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__)
> >> +#ifdef O_BINARY
> >>      access |= O_BINARY;
> >>  #endif
> >>      fd = open(filename, access, 0666);
> >> @@ -95,7 +95,7 @@
> >>      } else {
> >>          fd = 0;
> >>      }
> >> -#if defined(__MINGW32__) || defined(CONFIG_OS2) || defined(__CYGWIN__)
> >> +#ifdef O_BINARY
> >>      setmode(fd, O_BINARY);
> >>  #endif
> >>      h->priv_data = (void *)(size_t)fd;
> >>     
> >
> > Looks OK to me.  Who is maintainer of file.c?

iam maintainer of everything where noone else is :(


> >
> >   
> 
> It seems like no one is... Ok to apply anyways?

patch ok


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070625/08c33d8a/attachment.pgp>



More information about the ffmpeg-devel mailing list