A similar fix was committed to my tree about a year ago. Let me know if it works for you. I intend to push that change to mplayerhq svn as soon as I can.
Thanks E On Tue, Nov 6, 2012 at 10:21 AM, Reimar Döffinger <[email protected]> wrote: > Hello, > mostly purely theoretical, but we might get 0 as fd from open. > I used the exact -1 check, because e.g. WinCE will also use other > negative value as file descriptors (it basically just uses memory > pointers cast to int as far as I know) and I don't see a good reason > to check for >= 0 instead. > > Index: vm/vm.c > =================================================================== > --- vm/vm.c (revision 1243) > +++ vm/vm.c (working copy) > @@ -172,7 +172,7 @@ > > /* Read DVD name */ > fd = open(device, O_RDONLY); > - if (fd > 0) { > + if (fd != -1) { > off = lseek( fd, 32 * (off_t) DVD_VIDEO_LB_LEN, SEEK_SET ); > if( off == ( 32 * (off_t) DVD_VIDEO_LB_LEN ) ) { > off = read( fd, data, DVD_VIDEO_LB_LEN ); > > _______________________________________________ > DVDnav-discuss mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss -- Erik Hovland [email protected] http://hovland.org/ _______________________________________________ DVDnav-discuss mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
