[MPlayer-dev-eng] [PATCH] VCD support for Windows (except Win9x)
Compn
tempn at twmi.rr.com
Mon Mar 12 16:57:50 CET 2007
On Sat, 10 Mar 2007 19:59:13 +0800,
Zuxy Meng scribed:
> Hi,
>
> 2007/3/10, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> > Hello,
> > On Sat, Mar 10, 2007 at 02:21:48PM +0800, Zuxy Meng wrote:
> > > 2007/3/9, Reimar Döffinger
> > > <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> > > >On Wed, Feb 28, 2007 at 04:10:15PM +0800, Zuxy Meng wrote:
> > > >> +#ifdef WIN32
> > > >> + device[4] = p->device[0];
> > > >> + hd = CreateFile(device, GENERIC_READ, FILE_SHARE_READ, NULL,
> > > >> + OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL);
> > > >> + /* It's safe here: when f gets close()'ed, hd will be
> > > >> released too. */
> > > >> + f = _open_osfhandle((long)hd, _O_RDONLY);
> > > >
> > > >Not really important, but I don't quite understand what the
> > > >comment is supposed to mean. A comment why CreateFile is needed
> > > >and a "normal" open does not work might be interesting, too.
> > >
> > > What about:
> > >
> > > open() on Windows can't get a file descriptor to a device so we
> > > have to use CreateFile to get a handle first and convert it to a
> > > fd.
> >
> > A simple "open() can't be used for devices so do it the complicated
> > way" or something like that would be good enough for me. Shorted
> > comments means less chance to confuse :-)
>
> OK. Patch updated.
thanks, applied.
-compn
More information about the MPlayer-dev-eng
mailing list