mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 08:12:17 +00:00
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:
parent
fd35d1bfe3
commit
eb6b6698a1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user