[MPlayer-cvslog] r19800 - trunk/libmpdemux/demux_mf.c
reimar
subversion at mplayerhq.hu
Mon Sep 11 21:01:20 CEST 2006
Author: reimar
Date: Mon Sep 11 21:01:20 2006
New Revision: 19800
Modified:
trunk/libmpdemux/demux_mf.c
Log:
Avoid division by zero DEMUXER_CTRL_GET_PERCENT_POS with only one frame by just
returning DONTKNOW. A better formula to calculate position would probably be a better
fix though.
Modified: trunk/libmpdemux/demux_mf.c
==============================================================================
--- trunk/libmpdemux/demux_mf.c (original)
+++ trunk/libmpdemux/demux_mf.c Mon Sep 11 21:01:20 2006
@@ -150,6 +150,8 @@
return DEMUXER_CTRL_OK;
case DEMUXER_CTRL_GET_PERCENT_POS:
+ if (mf->nr_of_files <= 1)
+ return DEMUXER_CTRL_DONTKNOW;
*((int *)arg) = 100 * mf->curr_frame / (mf->nr_of_files - 1);
return DEMUXER_CTRL_OK;
More information about the MPlayer-cvslog
mailing list