summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiklesh <niklesh.lalwani@iitb.ac.in>2015-08-07 20:50:14 +0530
committerPhilip Langdale <philipl@overt.org>2015-08-07 16:33:31 -0700
commitecc806a224d7191f59d81ff5c4004084cf032c71 (patch)
treeef4d29622ac2296c476f586081f8358f125a6c07
parent7d3aa2ca63c2bb540d18fc16e24586f377dc2044 (diff)
downloadffmpeg-streaming-ecc806a224d7191f59d81ff5c4004084cf032c71.zip
ffmpeg-streaming-ecc806a224d7191f59d81ff5c4004084cf032c71.tar.gz
movtextdec: Fix memory leaks by freeing mem allocs correctly
Initialize m->count_f to 0 at the correct place to free memory allocs properly. Signed-off-by: Niklesh <niklesh.lalwani@iitb.ac.in>
-rw-r--r--libavcodec/movtextdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index 83b0231..fc6993e 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -107,6 +107,7 @@ static int mov_text_tx3g(AVCodecContext *avctx, MovTextContext *m)
char *tx3g_ptr = avctx->extradata;
int i, box_size, font_length;
+ m->count_f = 0;
m->ftab_entries = 0;
box_size = BOX_SIZE_INITIAL; /* Size till ftab_entries */
if (avctx->extradata_size < box_size)
@@ -363,7 +364,6 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
m->style_entries = 0;
m->box_flags = 0;
m->count_s = 0;
- m->count_f = 0;
// Note that the spec recommends lines be no longer than 2048 characters.
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
if (text_length + 2 != avpkt->size) {
OpenPOWER on IntegriCloud