OSDN Git Service

avformat/wtvenc: Use av_realloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 11 Apr 2015 11:50:07 +0000 (13:50 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 11 Apr 2015 11:50:50 +0000 (13:50 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/wtvenc.c

index e8a2b72..8aebddd 100644 (file)
@@ -112,7 +112,7 @@ typedef struct {
 static void add_serial_pair(WtvSyncEntry ** list, int * count, int64_t serial, int64_t value)
 {
     int new_count = *count + 1;
-    WtvSyncEntry *new_list = av_realloc(*list, new_count * sizeof(WtvSyncEntry));
+    WtvSyncEntry *new_list = av_realloc_array(*list, new_count, sizeof(WtvSyncEntry));
     if (!new_list)
         return;
     new_list[*count] = (WtvSyncEntry){serial, value};