lavfi: fix realloc size computation in avfilter_add_format()