1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-19 05:41:16 +00:00

Don't dynamically allocate sub_packet_lengths[] in raac demuxing.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25627 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
rtogni 2008-01-06 14:10:30 +00:00
parent 7cbf2af4a3
commit b9a788edaa

View File

@ -665,12 +665,11 @@ got_audio:
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 @@ got_audio:
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')) ||