[Mplayer-cvslog] CVS: main/libmpdemux demux_fli.c,1.1,1.2
Mike Melanson
melanson at mplayer.dev.hu
Sun Nov 25 01:56:43 CET 2001
Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv30498/libmpdemux
Modified Files:
demux_fli.c
Log Message:
fixed divide-by-0 bug in FLI demuxer
Index: demux_fli.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_fli.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- demux_fli.c 24 Nov 2001 23:58:12 -0000 1.1
+++ demux_fli.c 25 Nov 2001 00:56:41 -0000 1.2
@@ -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
More information about the MPlayer-cvslog
mailing list