Mercurial > mplayer.hg
changeset 25599:a836d1288d59
Don't dynamically allocate sub_packet_lengths[] in raac demuxing.
author | rtogni |
---|---|
date | Sun, 06 Jan 2008 14:10:30 +0000 |
parents | 0cf6c33e4400 |
children | 785d273c050f |
files | libmpdemux/demux_real.c |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_real.c Sun Jan 06 13:49:07 2008 +0000 +++ b/libmpdemux/demux_real.c Sun Jan 06 14:10:30 2008 +0000 @@ -665,12 +665,11 @@ static int cnt2=CRACK_MATRIX; #endif if (((sh_audio_t *)ds->sh)->format == mmioFOURCC('M', 'P', '4', 'A')) { - uint16_t *sub_packet_lengths, sub_packets, i; + uint16_t sub_packet_lengths[16], sub_packets, i; /* AAC in Real: several AAC frames in one Real packet. */ /* Second byte, upper four bits: number of AAC frames */ /* next n * 2 bytes: length of the AAC frames in bytes, BE */ sub_packets = (stream_read_word(demuxer->stream) & 0xf0) >> 4; - sub_packet_lengths = calloc(sub_packets, sizeof(uint16_t)); for (i = 0; i < sub_packets; i++) sub_packet_lengths[i] = stream_read_word(demuxer->stream); for (i = 0; i < sub_packets; i++) { @@ -682,7 +681,6 @@ dp->pos = demuxer->filepos; ds_add_packet(ds, dp); } - free(sub_packet_lengths); return 1; } if ((priv->intl_id[stream_id] == mmioFOURCC('I', 'n', 't', '4')) ||