summaryrefslogtreecommitdiff
path: root/libavformat/webvttdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/webvttdec.c')
-rw-r--r--libavformat/webvttdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c
index 6c4d5f6736..bd3d45b382 100644
--- a/libavformat/webvttdec.c
+++ b/libavformat/webvttdec.c
@@ -164,6 +164,8 @@ static int webvtt_read_header(AVFormatContext *s)
ff_subtitles_queue_finalize(s, &webvtt->q);
end:
+ if (res < 0)
+ ff_subtitles_queue_clean(&webvtt->q);
av_bprint_finalize(&cue, NULL);
return res;
}