Mercurial > libdvdnav.hg
changeset 246:0ba179301f71 src
division by zero fix reported by david huber
author | mroi |
---|---|
date | Fri, 21 May 2004 19:32:25 +0000 |
parents | b4f9a592bc84 |
children | 84f652524ecb |
files | vm/vm.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/vm/vm.c Wed May 19 18:31:11 2004 +0000 +++ b/vm/vm.c Fri May 21 19:32:25 2004 +0000 @@ -450,7 +450,7 @@ time += ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.minute & 0x0f) * 60; time += ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.second >> 4 ) * 10; time += ((vm->state).pgc->cell_playback[(vm->state).cellN - 1].playback_time.second & 0x0f) * 1; - if (size / time > 30) + if (!time || size / time > 30) /* datarate is too high, it might be a very short, but regular cell */ return; if (time > 0xff) time = 0xff;