diff options
author | Mike Melanson <mike@multimedia.cx> | 2003-05-26 20:53:09 +0000 |
---|---|---|
committer | Mike Melanson <mike@multimedia.cx> | 2003-05-26 20:53:09 +0000 |
commit | 5a634a69521ce53b1e6535ab0de5c1608b8060a8 (patch) | |
tree | c260547baa3313191ad93a172182ce1866c94449 | |
parent | 59fcece91053804a5daa061a2e16f548f3357980 (diff) | |
download | ffmpeg-streaming-5a634a69521ce53b1e6535ab0de5c1608b8060a8.zip ffmpeg-streaming-5a634a69521ce53b1e6535ab0de5c1608b8060a8.tar.gz |
allocate enough bytes
Originally committed as revision 1908 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/4xm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/4xm.c b/libavformat/4xm.c index c1d5f67..b45fd05 100644 --- a/libavformat/4xm.c +++ b/libavformat/4xm.c @@ -151,8 +151,9 @@ static int fourxm_read_header(AVFormatContext *s, } current_track = LE_32(&header[i + 8]); if (current_track + 1 > fourxm->track_count) { - fourxm->track_count++; - fourxm->tracks = av_realloc(fourxm->tracks, fourxm->track_count); + fourxm->track_count = current_track + 1; + fourxm->tracks = av_realloc(fourxm->tracks, + fourxm->track_count * sizeof(AudioTrack)); if (!fourxm->tracks) { av_free(header); return AVERROR_NOMEM; |