mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
ffv1dec: correctly track configured_width/height
The 2 parameters were not synchronized between decoding threads.
This commit is contained in:
@@ -508,15 +508,15 @@ static int read_header(FFV1Context *f, RangeCoder *c)
|
||||
return ret;
|
||||
|
||||
if (f->configured_pix_fmt != f->pix_fmt ||
|
||||
f->configured_width != f->avctx->width ||
|
||||
f->configured_height != f->avctx->height ||
|
||||
f->configured_width != f->width ||
|
||||
f->configured_height != f->height ||
|
||||
f->configured_ac != f->ac) {
|
||||
f->avctx->pix_fmt = get_pixel_format(f);
|
||||
if (f->avctx->pix_fmt < 0)
|
||||
return AVERROR(EINVAL);
|
||||
f->configured_pix_fmt = f->pix_fmt;
|
||||
f->configured_width = f->avctx->width;
|
||||
f->configured_height = f->avctx->height;
|
||||
f->configured_width = f->width;
|
||||
f->configured_height = f->height;
|
||||
f->configured_ac = f->ac;
|
||||
}
|
||||
|
||||
@@ -924,6 +924,8 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
|
||||
fdst->pix_fmt = fsrc->pix_fmt;
|
||||
fdst->configured_pix_fmt = fsrc->configured_pix_fmt;
|
||||
fdst->configured_ac = fsrc->configured_ac;
|
||||
fdst->configured_width = fsrc->configured_width;
|
||||
fdst->configured_height = fsrc->configured_height;
|
||||
|
||||
fdst->ec = fsrc->ec;
|
||||
fdst->intra = fsrc->intra;
|
||||
|
||||
Reference in New Issue
Block a user