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

Måns Rullgård mans
Sat Jun 23 00:33:11 CEST 2007


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?

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list