summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-06 14:10:30 +0000
committerrtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-06 14:10:30 +0000
commitb9a788edaaa96c65eb637fa4b09fd5ab41b1e9fb (patch)
treeab83c240b800a76da1dac7e82513671f9a2b90f6 /libmpdemux
parent7cbf2af4a3ef081eb0d1de65e9d330f98fb1d7c7 (diff)
downloadmpv-b9a788edaaa96c65eb637fa4b09fd5ab41b1e9fb.tar.bz2
mpv-b9a788edaaa96c65eb637fa4b09fd5ab41b1e9fb.tar.xz
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
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_real.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libmpdemux/demux_real.c b/libmpdemux/demux_real.c
index d7213ab93c..a2e4fb3cef 100644
--- a/libmpdemux/demux_real.c
+++ b/libmpdemux/demux_real.c
@@ -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')) ||