avcodec/pgssubdec: split out flush_cache()