avfiltergraph: check the query_formats() return value