Fix endless loop if nAvgBytesPerSec is 0.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25800 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2008-01-19 14:43:58 +00:00
parent fd35d1bfe3
commit eb6b6698a1
1 changed files with 1 additions and 0 deletions

View File

@ -582,6 +582,7 @@ static int demux_audio_fill_buffer(demuxer_t *demuxer, demux_stream_t *ds) {
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);