There is no reason to think that an attachment will contain text subtitles. Furthermore, attachments are exported in extradata, so the AV_CODEC_ID_TEXT decoder would not do anything useful with them anyway.