avcodec/decode: Check size before opening iconv