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

Ramiro Ribeiro Polla ramiro
Mon Jun 25 18:30:45 CEST 2007


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?
>
>   

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

Ramiro Polla




More information about the ffmpeg-devel mailing list