[MPlayer-cvslog] r25666 - trunk/libmpcodecs/ad_faad.c
eugeni
subversion at mplayerhq.hu
Thu Jan 10 20:47:20 CET 2008
Author: eugeni
Date: Thu Jan 10 20:47:18 2008
New Revision: 25666
Log:
Use malloc for codecdata. Fixes segfault in free_sh_sub_t.
Modified:
trunk/libmpcodecs/ad_faad.c
Modified: trunk/libmpcodecs/ad_faad.c
==============================================================================
--- trunk/libmpcodecs/ad_faad.c (original)
+++ trunk/libmpcodecs/ad_faad.c Thu Jan 10 20:47:18 2008
@@ -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) {
More information about the MPlayer-cvslog
mailing list