mpeg12dec: simplify context duplication
CC: libav-stable@libav.org Bug-Id: CID 717453 / CID 717454 / CID 717915
This commit is contained in:
parent
37b3361e75
commit
5d29efe4b0
@ -1138,8 +1138,11 @@ static int mpeg_decode_update_thread_context(AVCodecContext *avctx,
|
|||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
if (!ctx->mpeg_enc_ctx_allocated)
|
if (!ctx->mpeg_enc_ctx_allocated) {
|
||||||
memcpy(s + 1, s1 + 1, sizeof(Mpeg1Context) - sizeof(MpegEncContext));
|
// copy the whole context after the initial MpegEncContext structure
|
||||||
|
memcpy(ctx, ctx_from, sizeof(*ctx));
|
||||||
|
memset(&ctx->mpeg_enc_ctx, 0, sizeof(ctx->mpeg_enc_ctx));
|
||||||
|
}
|
||||||
|
|
||||||
if (!(s->pict_type == AV_PICTURE_TYPE_B || s->low_delay))
|
if (!(s->pict_type == AV_PICTURE_TYPE_B || s->low_delay))
|
||||||
s->picture_number++;
|
s->picture_number++;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user