aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1dec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2024-10-03 01:49:09 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2024-10-16 21:41:18 +0200
commit2542e9296c76524494a2d17a4423d756560b5273 (patch)
tree8f7d10170c25062cabef54adf4ed47fef9a6f28b /libavcodec/ffv1dec.c
parent31b5b3badc2bc3d9d59d5b534c84033c9eb3d577 (diff)
downloadffmpeg-2542e9296c76524494a2d17a4423d756560b5273.tar.gz
avcodec/ffv1: RCT is only possible with RGB
Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffv1dec.c')
-rw-r--r--libavcodec/ffv1dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 6aa36716cb..5c099e49ad 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -241,7 +241,7 @@ static int decode_slice_header(const FFV1Context *f,
if (f->version > 3) {
sc->slice_reset_contexts = get_rac(c, state);
sc->slice_coding_mode = get_symbol(c, state, 0);
- if (sc->slice_coding_mode != 1) {
+ if (sc->slice_coding_mode != 1 && f->colorspace == 1) {
sc->slice_rct_by_coef = get_symbol(c, state, 0);
sc->slice_rct_ry_coef = get_symbol(c, state, 0);
if ((uint64_t)sc->slice_rct_by_coef + (uint64_t)sc->slice_rct_ry_coef > 4) {