Check for eof instead of decoding the same data over and over.

The whole code could use a lot more checks on return values...


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16625 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2005-10-01 12:35:18 +00:00
parent 01a40bf853
commit ebd7dadd88
1 changed files with 1 additions and 0 deletions

View File

@ -432,6 +432,7 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
#if 1 #if 1
if(sh->a_in_buffer_len<=0){ if(sh->a_in_buffer_len<=0){
if (sh->ds->eof) return 0;
// fill the buffer! // fill the buffer!
if (sh->format == mmioFOURCC('1','4','_','4')) { if (sh->format == mmioFOURCC('1','4','_','4')) {
demux_read_data(sh->ds, sh->a_in_buffer, sh->wf->nBlockAlign); demux_read_data(sh->ds, sh->a_in_buffer, sh->wf->nBlockAlign);