From 50b4dbf65a8b0fbd0155e1ffc0ed58fa591d3736 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sun, 5 Aug 2012 08:57:20 -0700 Subject: ass subtitles: Fix valgrind warnings. We're now running some of this code through valgrind for the first time, and a few warnings showed up stemming from two problems. 1) The ASS code assumes the subtitle header is null terminated, but it wasn't, and passing the size down doesn't look like fun, so I added a terminator 2) The code wasn't freeing all of its state. Signed-off-by: Philip Langdale --- libavcodec/ass_split.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavcodec/ass_split.c') diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index a0b7254..81d501e 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -352,8 +352,10 @@ void ff_ass_split_free(ASSSplitContext *ctx) { if (ctx) { int i; - for (i=0; ifield_order[i])); + } av_free(ctx); } } -- cgit v1.1