Mercurial > mplayer.hg
changeset 7240:a1ae7d811e35
fixed uninit order
author | arpi |
---|---|
date | Sun, 01 Sep 2002 23:33:30 +0000 |
parents | 280aa5fdc0b4 |
children | 283561e2bef5 |
files | libmpcodecs/dec_audio.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/dec_audio.c Sun Sep 01 23:26:37 2002 +0000 +++ b/libmpcodecs/dec_audio.c Sun Sep 01 23:33:30 2002 +0000 @@ -131,14 +131,15 @@ void uninit_audio(sh_audio_t *sh_audio) { + if(sh_audio->inited){ + mp_msg(MSGT_DECAUDIO,MSGL_V,MSGTR_UninitAudioStr,sh_audio->codec->drv); + mpadec->uninit(sh_audio); + sh_audio->inited=0; + } if(sh_audio->a_buffer) free(sh_audio->a_buffer); sh_audio->a_buffer=NULL; if(sh_audio->a_in_buffer) free(sh_audio->a_in_buffer); sh_audio->a_in_buffer=NULL; - if(!sh_audio->inited) return; - mp_msg(MSGT_DECAUDIO,MSGL_V,MSGTR_UninitAudioStr,sh_audio->codec->drv); - mpadec->uninit(sh_audio); - sh_audio->inited=0; } int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int maxlen)