summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/subviewerdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c
index 83378eab5f..fdca3a4820 100644
--- a/libavformat/subviewerdec.c
+++ b/libavformat/subviewerdec.c
@@ -172,6 +172,8 @@ static int subviewer_read_header(AVFormatContext *s)
ff_subtitles_queue_finalize(s, &subviewer->q);
end:
+ if (res < 0)
+ ff_subtitles_queue_clean(&subviewer->q);
av_bprint_finalize(&header, NULL);
return res;
}