]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/utils.c
Remove a pointless right-shift in xan decoder.
[ffmpeg] / libavcodec / utils.c
index 7a24a4d246a4580aad5125f700844e9eef15531e..a37ace9cc5db1ec1b5b2fbff26f82c98d3369975 100644 (file)
@@ -80,6 +80,17 @@ void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size)
     return ptr;
 }
 
+void av_fast_malloc(void *ptr, unsigned int *size, unsigned int min_size)
+{
+    void **p = ptr;
+    if (min_size < *size)
+        return;
+    *size= FFMAX(17*min_size/16 + 32, min_size);
+    av_free(*p);
+    *p = av_malloc(*size);
+    if (!*p) *size = 0;
+}
+
 /* encoder management */
 static AVCodec *first_avcodec = NULL;