diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-09-01 23:33:30 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-09-01 23:33:30 +0000 |
commit | fc474a8e11cf3a41a08b7451745ca511fdfbeb17 (patch) | |
tree | 46a66e5b640d57f1294ef3b1f2ad2fb5172e5ba4 /libmpcodecs | |
parent | b8f2dc58c0a38a2b84d9ff5d6da728b98fea7850 (diff) |
fixed uninit order
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7241 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/dec_audio.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c index 9878f82907..3def4897d8 100644 --- a/libmpcodecs/dec_audio.c +++ b/libmpcodecs/dec_audio.c @@ -131,14 +131,15 @@ int init_audio(sh_audio_t *sh_audio) 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) |