avcodec/dvdsubdec: fix accessing dangling pointers