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

reimar subversion at mplayerhq.hu
Sat Jan 19 15:43:59 CET 2008


Author: reimar
Date: Sat Jan 19 15:43:58 2008
New Revision: 25800

Log:
Fix endless loop if nAvgBytesPerSec 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:43:58 2008
@@ -582,6 +582,7 @@ static int demux_audio_fill_buffer(demux
   case WAV : {
     unsigned align = sh_audio->wf->nBlockAlign;
     l = sh_audio->wf->nAvgBytesPerSec;
+    if (l <= 0) l = 65536;
     if (demux->movi_end && l > demux->movi_end - stream_tell(s)) {
       // do not read beyond end, there might be junk after data chunk
       l = demux->movi_end - stream_tell(s);



More information about the MPlayer-cvslog mailing list