# HG changeset patch # User atmos4 # Date 1016937500 0 # Node ID 6dc0ac26eb0e1f10b28cca7032eccbe89109601f # Parent d72c3169a343492cacc084019bf387550c142b73 eeh 10l, forgot malloc of esds struct. diff -r d72c3169a343 -r 6dc0ac26eb0e libmpdemux/demux_mov.c --- a/libmpdemux/demux_mov.c Sun Mar 24 02:25:41 2002 +0000 +++ b/libmpdemux/demux_mov.c Sun Mar 24 02:38:20 2002 +0000 @@ -704,9 +704,9 @@ int atom_len = char2int(trak->stdata,28); switch(char2int(trak->stdata,32)) { // atom type case MOV_FOURCC('e','s','d','s'): { - esds_t *esds; mp_msg(MSGT_DEMUX, MSGL_INFO, "MOV: Found MPEG4 audio Elementary Stream Descriptor atom (%d)!\n", atom_len); if(atom_len >= 8) { + esds_t *esds = (esds_t *)malloc(sizeof(esds_t)); if(!mp4_parse_esds(&trak->stdata[36], atom_len-8, esds)) { sh->i_bps = esds->avgBitrate/8; @@ -716,6 +716,7 @@ sh->codecdata = (unsigned char *)malloc(sh->codecdata_len); memcpy(sh->codecdata, esds->decoderConfig, sh->codecdata_len); } + free(esds); #if 0 { FILE* f=fopen("esds.dat","wb"); fwrite(&trak->stdata[36],atom_len-8,1,f);