X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Fffv1dec.c;h=5fbe51c5a5874cd34fb290e49ad8425d70a99cea;hp=c408f16106ed0595315ca55230da57f4556282db;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavcodec/ffv1dec.c b/ffmpeg/libavcodec/ffv1dec.c index c408f16..5fbe51c 100644 --- a/ffmpeg/libavcodec/ffv1dec.c +++ b/ffmpeg/libavcodec/ffv1dec.c @@ -1051,12 +1051,17 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src) return 0; { - FFV1Context bak = *fdst; + ThreadFrame picture = fdst->picture, last_picture = fdst->last_picture; + uint8_t (*initial_states[MAX_QUANT_TABLES])[32]; + struct FFV1Context *slice_context[MAX_SLICES]; + memcpy(initial_states, fdst->initial_states, sizeof(fdst->initial_states)); + memcpy(slice_context, fdst->slice_context , sizeof(fdst->slice_context)); + memcpy(fdst, fsrc, sizeof(*fdst)); - memcpy(fdst->initial_states, bak.initial_states, sizeof(fdst->initial_states)); - memcpy(fdst->slice_context, bak.slice_context , sizeof(fdst->slice_context)); - fdst->picture = bak.picture; - fdst->last_picture = bak.last_picture; + memcpy(fdst->initial_states, initial_states, sizeof(fdst->initial_states)); + memcpy(fdst->slice_context, slice_context , sizeof(fdst->slice_context)); + fdst->picture = picture; + fdst->last_picture = last_picture; for (i = 0; inum_h_slices * fdst->num_v_slices; i++) { FFV1Context *fssrc = fsrc->slice_context[i]; FFV1Context *fsdst = fdst->slice_context[i];