avfilter/f_metadata: fix few logic errors