# HG changeset patch # User melanson # Date 1006649801 0 # Node ID 829637d529e92c8d0485fbde2aea3b2949ccae1b # Parent 3867ec4a02d28c8bb3a59492524d8a6c7d618a26 fixed divide-by-0 bug in FLI demuxer diff -r 3867ec4a02d2 -r 829637d529e9 libmpdemux/demux_fli.c --- a/libmpdemux/demux_fli.c Sun Nov 25 00:40:26 2001 +0000 +++ b/libmpdemux/demux_fli.c Sun Nov 25 00:56:41 2001 +0000 @@ -54,6 +54,7 @@ sh_video_t *sh_video = NULL; fli_frames_t *frames = (fli_frames_t *)malloc(sizeof(fli_frames_t)); int frame_number; + int speed; // go back to the beginning stream_reset(demuxer->stream); @@ -94,7 +95,10 @@ stream_skip(demuxer->stream, 4); // get the speed - sh_video->fps = 1000 / stream_read_word_le(demuxer->stream); + speed = stream_read_word_le(demuxer->stream); + if (speed == 0) + speed = 1; + sh_video->fps = 1000 / speed; sh_video->frametime = 1/sh_video->fps; // build the frame index