1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 23:32:26 +00:00

Check for eof in loop searching for data chunk.

Fixes bug #775.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22604 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-03-15 10:38:51 +00:00
parent 99b2bd502c
commit ec62af965e

View File

@ -453,7 +453,7 @@ static int demux_audio_open(demuxer_t* demuxer) {
chunk_size = stream_read_dword_le(demuxer->stream);
if (chunk_type != mmioFOURCC('d', 'a', 't', 'a'))
stream_skip(demuxer->stream, chunk_size);
} while (chunk_type != mmioFOURCC('d', 'a', 't', 'a'));
} while (!s->eof && chunk_type != mmioFOURCC('d', 'a', 't', 'a'));
demuxer->movi_start = stream_tell(s);
demuxer->movi_end = chunk_size ? demuxer->movi_start + chunk_size : s->end_pos;
// printf("wav: %X .. %X\n",(int)demuxer->movi_start,(int)demuxer->movi_end);