Skip to content

Commit 1132299

Browse files
committed
Merge commit 'da7d839a0d3ec40423a665dc85e0cfaed3f92eb8'
* commit 'da7d839a0d3ec40423a665dc85e0cfaed3f92eb8': ffv1dec: check that global parameters do not change in version 0/1 Conflicts: libavcodec/ffv1dec.c See: b05cd1e Merged-by: Michael Niedermayer <[email protected]>
2 parents b097d17 + da7d839 commit 1132299

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

libavcodec/ffv1dec.c

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -632,31 +632,31 @@ static int read_header(FFV1Context *f)
632632
f->state_transition[i] = get_symbol(c, state, 1) + c->one_state[i];
633633
}
634634

635-
colorspace = get_symbol(c, state, 0); //YUV cs type
635+
colorspace = get_symbol(c, state, 0); //YUV cs type
636636
bits_per_raw_sample = f->version > 0 ? get_symbol(c, state, 0) : f->avctx->bits_per_raw_sample;
637-
chroma_planes = get_rac(c, state);
638-
chroma_h_shift = get_symbol(c, state, 0);
639-
chroma_v_shift = get_symbol(c, state, 0);
640-
transparency = get_rac(c, state);
637+
chroma_planes = get_rac(c, state);
638+
chroma_h_shift = get_symbol(c, state, 0);
639+
chroma_v_shift = get_symbol(c, state, 0);
640+
transparency = get_rac(c, state);
641641

642642
if (f->plane_count) {
643-
if ( colorspace != f->colorspace
644-
|| bits_per_raw_sample != f->avctx->bits_per_raw_sample
645-
|| chroma_planes != f->chroma_planes
646-
|| chroma_h_shift!= f->chroma_h_shift
647-
|| chroma_v_shift!= f->chroma_v_shift
648-
|| transparency != f->transparency) {
643+
if (colorspace != f->colorspace ||
644+
bits_per_raw_sample != f->avctx->bits_per_raw_sample ||
645+
chroma_planes != f->chroma_planes ||
646+
chroma_h_shift != f->chroma_h_shift ||
647+
chroma_v_shift != f->chroma_v_shift ||
648+
transparency != f->transparency) {
649649
av_log(f->avctx, AV_LOG_ERROR, "Invalid change of global parameters\n");
650650
return AVERROR_INVALIDDATA;
651651
}
652652
}
653653

654-
f->colorspace = colorspace;
654+
f->colorspace = colorspace;
655655
f->avctx->bits_per_raw_sample = bits_per_raw_sample;
656-
f->chroma_planes = chroma_planes;
657-
f->chroma_h_shift = chroma_h_shift;
658-
f->chroma_v_shift = chroma_v_shift;
659-
f->transparency = transparency;
656+
f->chroma_planes = chroma_planes;
657+
f->chroma_h_shift = chroma_h_shift;
658+
f->chroma_v_shift = chroma_v_shift;
659+
f->transparency = transparency;
660660

661661
f->plane_count = 2 + f->transparency;
662662
}

0 commit comments

Comments
 (0)