graphparser: fix logic for updating the open_inputs/outputs in avfilter_graph_parse()