1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-14 10:55:43 +00:00

eeh 10l, forgot malloc of esds struct.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5303 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
atmos4 2002-03-24 02:38:20 +00:00
parent 086814f294
commit a316f53a83

View File

@ -704,9 +704,9 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
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 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
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);