[MPlayer-cvslog] r25799 - trunk/libmpdemux/demux_audio.c

reimar subversion at mplayerhq.hu
Sat Jan 19 15:38:24 CET 2008


Author: reimar
Date: Sat Jan 19 15:38:24 2008
New Revision: 25799

Log:
Avoid a division by 0 if i_bps is 0.


Modified:
   trunk/libmpdemux/demux_audio.c

Modified: trunk/libmpdemux/demux_audio.c
==============================================================================
--- trunk/libmpdemux/demux_audio.c	(original)
+++ trunk/libmpdemux/demux_audio.c	Sat Jan 19 15:38:24 2008
@@ -691,7 +691,7 @@ static void demux_close_audio(demuxer_t*
 
 static int demux_audio_control(demuxer_t *demuxer,int cmd, void *arg){
     sh_audio_t *sh_audio=demuxer->audio->sh;
-    int audio_length = demuxer->movi_end / sh_audio->i_bps;
+    int audio_length = sh_audio->i_bps ? demuxer->movi_end / sh_audio->i_bps : 0;
     da_priv_t* priv = demuxer->priv;
 	    
     switch(cmd) {



More information about the MPlayer-cvslog mailing list