mirror of https://github.com/mpv-player/mpv
Properly free memory allocate by liba52.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26955 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
167c4a1990
commit
6ab8ece718
|
@ -128,14 +128,17 @@ static int init(sh_audio_t *sh_audio)
|
||||||
}
|
}
|
||||||
if(ac3dts_fillbuff(sh_audio) < 0)
|
if(ac3dts_fillbuff(sh_audio) < 0)
|
||||||
{
|
{
|
||||||
|
a52_free(a52_state);
|
||||||
mp_msg(MSGT_DECAUDIO, MSGL_ERR, "AC3/DTS sync failed\n");
|
mp_msg(MSGT_DECAUDIO, MSGL_ERR, "AC3/DTS sync failed\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
sh_audio->context = a52_state;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void uninit(sh_audio_t *sh)
|
static void uninit(sh_audio_t *sh)
|
||||||
{
|
{
|
||||||
|
a52_free(sh->context);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int control(sh_audio_t *sh,int cmd,void* arg, ...)
|
static int control(sh_audio_t *sh,int cmd,void* arg, ...)
|
||||||
|
|
|
@ -253,6 +253,7 @@ while(sh_audio->channels>0){
|
||||||
|
|
||||||
static void uninit(sh_audio_t *sh)
|
static void uninit(sh_audio_t *sh)
|
||||||
{
|
{
|
||||||
|
a52_free(a52_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int control(sh_audio_t *sh,int cmd,void* arg, ...)
|
static int control(sh_audio_t *sh,int cmd,void* arg, ...)
|
||||||
|
|
Loading…
Reference in New Issue