Share the utf8 to wchar conversion routine between lavf and lavu