summaryrefslogtreecommitdiff
path: root/libavformat/subviewerdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/subviewerdec.c')
-rw-r--r--libavformat/subviewerdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c
index af084f4856..e8d1eb6c96 100644
--- a/libavformat/subviewerdec.c
+++ b/libavformat/subviewerdec.c
@@ -156,6 +156,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;
}