avfilter/vf_format: Check pix_fmts before dereferencing it