Fixed in my tree as of February 2012. I used a cast to int64_t, but otherwise, the same fix. This is slated for push into mplayerhq svn as soon as I get around to it.
Thanks for the patch. E On Tue, Nov 6, 2012 at 10:09 AM, Reimar Döffinger <[email protected]> wrote: > Hello, > currently the calculation will use int and thus overflow for anything > larger or equal to 20 hours. > Not sure if this is the best/nicest way, personally I prefer to do this > kind of thing with the > result = hour >> 4; > result *= 10; > result += hour; > result *= 6; > result += minute >> 4; > result *= 10; > .... > scheme, but this is the minimal change required. > > Index: dvdnav.c > =================================================================== > --- dvdnav.c (revision 1243) > +++ dvdnav.c (working copy) > @@ -203,7 +203,7 @@ > int64_t result; > int64_t frames; > > - result = (time->hour >> 4 ) * 10 * 60 * 60 * 90000; > + result = (time->hour >> 4 ) * 10 * 60 * 60 * 90000ull; > result += (time->hour & 0x0f) * 60 * 60 * 90000; > result += (time->minute >> 4 ) * 10 * 60 * 90000; > result += (time->minute & 0x0f) * 60 * 90000; > > _______________________________________________ > 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
