mirror of https://github.com/mpv-player/mpv
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:
parent
01a40bf853
commit
ebd7dadd88
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue