Tell the compiler exactly when to convert types. Otherwise at least my cross mingw gcc did some BS and produced bogus values resulting in mkvextract being locked in very long loops.

This commit is contained in:
Moritz Bunkus 2005-03-23 18:24:10 +00:00
parent 0ff59ed27e
commit 16e140149e
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-03-23 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bug fix: Due to the compiler doing some strange number
conversion mkvextract seemed to hang on Windows with certain
files.
2005-03-20 Moritz Bunkus <moritz@bunkus.org>
* mkvmerge: bug fix: Appending VobSubs with more than one track in

View File

@ -84,10 +84,10 @@ xtr_avi_c::handle_block(KaxBlock &block,
AVI_write_frame(avi, (char *)data.Buffer(), data.Size(),
bref != 0 ? 0 : 1);
if (iabs(duration / 1000000 - (int64_t)(1000.0 / fps)) > 1) {
if (((double)duration / 1000000.0 - (1000.0 / fps)) >= 1.5) {
int k, nfr;
nfr = irnd(duration / 1000000 * fps / 1000.0);
nfr = irnd((double)duration / 1000000.0 * fps / 1000.0);
for (k = 2; k <= nfr; k++)
AVI_write_frame(avi, "", 0, 0);
}