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
