bitstream: 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>
Wed, 28 Sep 2011 16:13:52 +0000 (18:13 +0200)
Signed-off-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/bitstream.c

index b164ecd..191190d 100644 (file)
@@ -105,8 +105,8 @@ static int alloc_table(VLC *vlc, int size, int use_static)
         if(use_static)
             abort(); //cant do anything, init_vlc() is used with too little memory
         vlc->table_allocated += (1 << vlc->bits);
-        vlc->table = av_realloc(vlc->table,
-                                sizeof(VLC_TYPE) * 2 * vlc->table_allocated);
+        vlc->table = av_realloc_f(vlc->table,
+                                  vlc->table_allocated, sizeof(VLC_TYPE) * 2);
         if (!vlc->table)
             return -1;
     }