avformat: utils: Refactor duplicated PRINT macro