You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/mpeg12dec: clear mpeg_enc_ctx_allocated when contexts are deallocated
Fixes Ticket2950 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1211,6 +1211,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
|
|||||||
s->parse_context.buffer = 0;
|
s->parse_context.buffer = 0;
|
||||||
ff_MPV_common_end(s);
|
ff_MPV_common_end(s);
|
||||||
s->parse_context = pc;
|
s->parse_context = pc;
|
||||||
|
s1->mpeg_enc_ctx_allocated = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((s->width == 0) || (s->height == 0))
|
if ((s->width == 0) || (s->height == 0))
|
||||||
@@ -2035,6 +2036,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
|
|||||||
s->out_format = FMT_MPEG1;
|
s->out_format = FMT_MPEG1;
|
||||||
if (s1->mpeg_enc_ctx_allocated) {
|
if (s1->mpeg_enc_ctx_allocated) {
|
||||||
ff_MPV_common_end(s);
|
ff_MPV_common_end(s);
|
||||||
|
s1->mpeg_enc_ctx_allocated = 0;
|
||||||
}
|
}
|
||||||
s->width = avctx->coded_width;
|
s->width = avctx->coded_width;
|
||||||
s->height = avctx->coded_height;
|
s->height = avctx->coded_height;
|
||||||
|
Reference in New Issue
Block a user