mirror of https://git.ffmpeg.org/ffmpeg.git
allocate enough bytes
Originally committed as revision 1908 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
59fcece910
commit
5a634a6952
|
@ -151,8 +151,9 @@ static int fourxm_read_header(AVFormatContext *s,
|
||||||
}
|
}
|
||||||
current_track = LE_32(&header[i + 8]);
|
current_track = LE_32(&header[i + 8]);
|
||||||
if (current_track + 1 > fourxm->track_count) {
|
if (current_track + 1 > fourxm->track_count) {
|
||||||
fourxm->track_count++;
|
fourxm->track_count = current_track + 1;
|
||||||
fourxm->tracks = av_realloc(fourxm->tracks, fourxm->track_count);
|
fourxm->tracks = av_realloc(fourxm->tracks,
|
||||||
|
fourxm->track_count * sizeof(AudioTrack));
|
||||||
if (!fourxm->tracks) {
|
if (!fourxm->tracks) {
|
||||||
av_free(header);
|
av_free(header);
|
||||||
return AVERROR_NOMEM;
|
return AVERROR_NOMEM;
|
||||||
|
|
Loading…
Reference in New Issue