avfilter/vf_hwupload_cuda: check ff_formats_ref for errors