Mercurial > mplayer.hg
changeset 19995:9cd5e242121e
in case of errors after decoding quit the main decoding
loop before memmove() when sh_audio->in_buffer_len <= 0;
patch by Chandan Pitta chandan.pitta gmail com
author | nicodvb |
---|---|
date | Wed, 27 Sep 2006 21:45:15 +0000 |
parents | 1fb575aaddcd |
children | aa7bb6ae26a7 |
files | libmpcodecs/ad_faad.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/ad_faad.c Wed Sep 27 20:52:20 2006 +0000 +++ b/libmpcodecs/ad_faad.c Wed Sep 27 21:45:15 2006 +0000 @@ -243,6 +243,10 @@ if(faac_finfo.error > 0) { mp_msg(MSGT_DECAUDIO,MSGL_WARN,"FAAD: error: %s, trying to resync!\n", faacDecGetErrorMessage(faac_finfo.error)); + if (sh->a_in_buffer_len <= 0) { + errors = MAX_FAAD_ERRORS; + break; + } sh->a_in_buffer_len--; memmove(sh->a_in_buffer,&sh->a_in_buffer[1],sh->a_in_buffer_len); aac_sync(sh);