[FFmpeg-cvslog] 4xm: Replace av_realloc by av_realloc_f when relevant.

Nicolas George git at videolan.org
Sat Oct 1 21:38:55 CEST 2011


ffmpeg | branch: release/0.8 | Nicolas George <nicolas.george at normalesup.org> | Wed Sep 28 17:16:11 2011 +0200| [2a934e87b18030ac0b94d1761048a5d5aa9d5ed9] | committer: Michael Niedermayer

4xm: Replace av_realloc by av_realloc_f when relevant.

Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 0cc44facf17153454727c26f2f40ee2f77b90df5)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a934e87b18030ac0b94d1761048a5d5aa9d5ed9
---

 libavformat/4xm.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 0b79c76..0a314dc 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -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;



More information about the ffmpeg-cvslog mailing list