[Ffmpeg-devel] [PATCH] mingw and temorary files

Michael Niedermayer michaelni
Sat Mar 25 02:19:52 CET 2006


Hi

On Fri, Mar 24, 2006 at 01:54:37PM -0800, Corey Hickey wrote:
> It seems that mkstemp() doesn't exist on mingw, which makes mplayer 
> (and, presumably, ffmpeg) fail to compile when CONFIG_XVID is defined. 
> There's a workaround in xvidff.c but not in xvid_rc.c. The attached 
> patch makes a new function av_tempfile() that contains the workaround.
> 
> Also, the call to open() in the current mingw workaround doesn't include 
> O_CREAT, so I don't think it ever worked properly.
> 
> This patch has been tested by a few people on the mplayer mailing lists, 
> so I'm reasonably sure it works right.
> 
> -Corey

> Index: avcodec.h
> ===================================================================
> RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/avcodec.h,v
> retrieving revision 1.458
> diff -u -r1.458 avcodec.h
> --- avcodec.h	21 Mar 2006 17:27:46 -0000	1.458
> +++ avcodec.h	23 Mar 2006 06:01:48 -0000
> @@ -2598,6 +2598,8 @@
>  
>  extern unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
>  
> +int av_tempfile(char *prefix, char **filename);
> +


avcodec.h is a public header, IMHO this isnt the correct spot for it

[...]

-- 
Michael





More information about the ffmpeg-devel mailing list