[MPlayer-cygwin] DVD startup mingw vs cygwin

Gianluigi Tiesi mplayer at netfarm.it
Thu Feb 10 21:05:34 CET 2005


On Thu, Feb 10, 2005 at 04:57:29PM +0100, Sascha Sommer wrote:
> On Saturday 29 January 2005 10:46, Gianluigi Tiesi wrote:
> > Sorry I'm dumb, .. mingw off_t is dumb... 4 byte instead of 8,
> > as Sasha said long long is enough, anyway after changes types.h of
> > mingw, try this patch for seeking.
> 
> Did you produce a test file for this? Could you please test if the attached 
> patch also works?
> 
> Sascha

> Index: libmpdemux/stream_file.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpdemux/stream_file.c,v
> retrieving revision 1.6
> diff -u -r1.6 stream_file.c
> --- libmpdemux/stream_file.c	31 Jul 2004 11:08:47 -0000	1.6
> +++ libmpdemux/stream_file.c	10 Feb 2005 15:55:45 -0000
> @@ -6,6 +6,10 @@
>  #include <fcntl.h>
>  #include <unistd.h>
>  
> +#ifdef __MINGW32__
> +#define lseek _lseeki64
> +#endif
> +
>  #include "mp_msg.h"
>  #include "stream.h"
>  #include "help_mp.h"

I think also stat struct (e.g. used by ffmpeg), seek and off_t should be
changed, but this can somehow incompatible with mingw api.
I was working with long long off_t by this will broke stat/fstat.
I don't think mplayer should be patched in tree to avoid this mingw
breakage, I've made the fix as temp workaround, I would to prefer
to fix it in mingw, since I also compile ffmpeg and it has different
but related problems. Your fix should work but if used togheter with
sys/types.h patch and sys/types.h patch interfer with ffmpeg.
So imho it's better to do not fix this on mplayer and use patches as a
workaround until a clean solution is found on mingw.
I think the problem can be solved in a clean way by patching some mingw
includes, I'll make some tests soon.

Bye

-- 
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/




More information about the MPlayer-cygwin mailing list