Fix a crash with PGS subtitles.

Fixes #4272