Fix broken buffer handling for external subtitles (Recent regression)

Fixes #1848
Fix a tiny memory leak