summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-14 00:31:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-14 00:31:40 +0200
commit108b91c3fe61f5296585a1e326e85f0f18576ad6 (patch)
tree37459d975294897b5a8cdfb16ea6026532a7b567
parent6c07e41f43026eb65b6a4afc3119d6666781c211 (diff)
avcodec/mpeg12dec: clear mpeg_enc_ctx_allocated when contexts are deallocated
Fixes Ticket2950 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpeg12dec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 3df8bf775a..b008708c86 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1211,6 +1211,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
s->parse_context.buffer = 0;
ff_MPV_common_end(s);
s->parse_context = pc;
+ s1->mpeg_enc_ctx_allocated = 0;
}
if ((s->width == 0) || (s->height == 0))
@@ -2035,6 +2036,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
s->out_format = FMT_MPEG1;
if (s1->mpeg_enc_ctx_allocated) {
ff_MPV_common_end(s);
+ s1->mpeg_enc_ctx_allocated = 0;
}
s->width = avctx->coded_width;
s->height = avctx->coded_height;