mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 04:36:24 +01:00
Use malloc for codecdata. Fixes segfault in free_sh_sub.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25666 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
ec74c68e3d
commit
85413c62e8
@ -75,7 +75,8 @@ static int init(sh_audio_t *sh)
|
||||
// If we don't get the ES descriptor, try manual config
|
||||
if(!sh->codecdata_len && sh->wf) {
|
||||
sh->codecdata_len = sh->wf->cbSize;
|
||||
sh->codecdata = (char*)(sh->wf+1);
|
||||
sh->codecdata = malloc(sh->codecdata_len);
|
||||
memcpy(sh->codecdata, sh->wf+1, sh->codecdata_len);
|
||||
mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"FAAD: codecdata extracted from WAVEFORMATEX\n");
|
||||
}
|
||||
if(!sh->codecdata_len) {
|
||||
|
Loading…
Reference in New Issue
Block a user