4xm: Replace av_realloc by av_realloc_f when relevant.
authorNicolas George <nicolas.george@normalesup.org>
Wed, 28 Sep 2011 15:16:11 +0000 (17:16 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 1 Oct 2011 18:49:41 +0000 (20:49 +0200)
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0cc44facf17153454727c26f2f40ee2f77b90df5)

libavformat/4xm.c

index 0b79c76..0a314dc 100644 (file)
@@ -173,8 +173,9 @@ static int fourxm_read_header(AVFormatContext *s,
             }
             if (current_track + 1 > fourxm->track_count) {
                 fourxm->track_count = current_track + 1;
-                fourxm->tracks = av_realloc(fourxm->tracks,
-                    fourxm->track_count * sizeof(AudioTrack));
+                fourxm->tracks = av_realloc_f(fourxm->tracks,
+                                              sizeof(AudioTrack),
+                                              fourxm->track_count);
                 if (!fourxm->tracks) {
                     ret=  AVERROR(ENOMEM);
                     goto fail;