[FFmpeg-cvslog] tools/ismindex.c: Use av_realloc_array()

Michael Niedermayer git at videolan.org
Tue Jan 6 21:35:58 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jan  6 21:08:20 2015 +0100| [dede2f7fc4441606fd07035e7c3e62421ec756b0] | committer: Michael Niedermayer

tools/ismindex.c: Use av_realloc_array()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 tools/ismindex.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/ismindex.c b/tools/ismindex.c
index d6386ac..47a148c 100644
--- a/tools/ismindex.c
+++ b/tools/ismindex.c
@@ -532,8 +532,9 @@ static int handle_file(struct Tracks *tracks, const char *file, int split,
             err = AVERROR(ENOMEM);
             goto fail;
         }
-        temp = av_realloc(tracks->tracks,
-                          sizeof(*tracks->tracks) * (tracks->nb_tracks + 1));
+        temp = av_realloc_array(tracks->tracks,
+                                tracks->nb_tracks + 1,
+                                sizeof(*tracks->tracks));
         if (!temp) {
             av_free(track);
             err = AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list