diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-19 14:43:58 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-19 14:43:58 +0000 |
commit | eb6b6698a1999134df875d3ba48dcf3a602dcc43 (patch) | |
tree | 3e3465e0bc5cea868e09ba11ca9db47772ed30e2 | |
parent | fd35d1bfe3bbae307ae46d576be2913a470b2098 (diff) |
Fix endless loop if nAvgBytesPerSec is 0.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25800 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/demux_audio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c index 6c74315d8f..9449836246 100644 --- a/libmpdemux/demux_audio.c +++ b/libmpdemux/demux_audio.c @@ -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); |