avcodec/ass: check for av_mallocz() failure