diff options
author | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-09-27 21:45:15 +0000 |
---|---|---|
committer | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-09-27 21:45:15 +0000 |
commit | 8ada2d6b870f0e7b102859c78c66382ddd5b3532 (patch) | |
tree | fd13246cb0edd6fa133f0cad3c7f5e431fc514c6 | |
parent | 2d5aedd5b3fe938873e211204976e32efab623cf (diff) |
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
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20001 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpcodecs/ad_faad.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libmpcodecs/ad_faad.c b/libmpcodecs/ad_faad.c index 4577f1489c..98be24df66 100644 --- a/libmpcodecs/ad_faad.c +++ b/libmpcodecs/ad_faad.c @@ -243,6 +243,10 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) 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); |