srt: Factor out a goto statement

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>