void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)
{
    void **p = ptr;
    if (min_size < *size)
        return;
    min_size= FFMAX(17*min_size/16 + 32, min_size);
    av_free(*p);
    *p = av_malloc(min_size);
    if (!*p) min_size = 0;
    *size= min_size;
}
['void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)\n{\n    void **p = ptr;\n    if (min_size > SIZE_MAX - FF_INPUT_BUFFER_PADDING_SIZE) {\n        av_freep(p);\n        *size = 0;\n        return;\n    }\n    av_fast_malloc(p, size, min_size + FF_INPUT_BUFFER_PADDING_SIZE);\n    if (*size)\n        memset((uint8_t *)*p + min_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);\n}', 'void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size)\n{\n    void **p = ptr;\n    if (min_size < *size)\n        return;\n    min_size= FFMAX(17*min_size/16 + 32, min_size);\n    av_free(*p);\n    *p = av_malloc(min_size);\n    if (!*p) min_size = 0;\n    *size= min_size;\n}']