Hi,
using the a64multienc encoder currently results in a crash due to a
double free.
This seems to be broken since [1].
Attached patch fixes this.
Best regards,
Andreas
1:
https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=13e9cc9ce0646ba8e31d837b5e6372ec80fa7a73
>From 78b5bdd67c72fbb316c3050d0809a3012ff04c4a Mon Sep 17 00:00:00 2001
From: Andreas Cadhalpun <andreas.cadhal...@googlemail.com>
Date: Sun, 22 Feb 2015 20:43:30 +0100
Subject: [PATCH 1/4] avcodec/a64multienc: use av_frame_ref instead of copying
the frame
This fixes freeing the frame buffer twice on cleanup leading to a crash.
---
libavcodec/a64multienc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index 6438c27..dfb4414 100644
--- a/libavcodec/a64multienc.c
+++ b/libavcodec/a64multienc.c
@@ -317,7 +317,9 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
} else {
/* fill up mc_meta_charset with data until lifetime exceeds */
if (c->mc_frame_counter < c->mc_lifetime) {
- *p = *pict;
+ ret = av_frame_ref(p, pict);
+ if (ret < 0)
+ return ret;
p->pict_type = AV_PICTURE_TYPE_I;
p->key_frame = 1;
to_meta_with_crop(avctx, p, meta + 32000 * c->mc_frame_counter);
--
2.1.4
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel