Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-03-09 21:24:09 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-03-12 20:03:50 +0300
commitfcabfc5590fec6b1a8dcd19e08ff0fb3f9467a56 (patch)
tree036accab72968f6fc108855680618f57ef299840
parent25e2ef355d8a5f2bb093811cee0aac19cc4889f8 (diff)
roqvideoenc: set enc->avctx in roq_encode_init
So far it is only set in roq_encode_frame, but it is used in roq_encode_end to free the coded_frame. This currently segfaults if roq_encode_frame is not called between roq_encode_init and roq_encode_end. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit cf82c426fadf90105e1fb9d5ecd267cc3aa2b288) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/roqvideoenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index a3c99870a0..4b008781bd 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -943,6 +943,8 @@ static int roq_encode_init(AVCodecContext *avctx)
av_lfg_init(&enc->randctx, 1);
+ enc->avctx = avctx;
+
enc->framesSinceKeyframe = 0;
if ((avctx->width & 0xf) || (avctx->height & 0xf)) {
av_log(avctx, AV_LOG_ERROR, "Dimensions must be divisible by 16\n");