lavfi: avfilter_merge_formats: handle case where inputs are same