From 7b723ebd5a6c355669aab774b3b1988d298a7472 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 18 Jul 2024 20:54:31 +0200 Subject: [PATCH] avcodec/dovi_rpudec: error out on strange RPU formats Better safe than sorry. --- libavcodec/dovi_rpudec.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/dovi_rpudec.c b/libavcodec/dovi_rpudec.c index 9f295d4fe4..878950d66d 100644 --- a/libavcodec/dovi_rpudec.c +++ b/libavcodec/dovi_rpudec.c @@ -482,6 +482,10 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size, dm_compression = get_bits(gb, 3); hdr->el_spatial_resampling_filter_flag = get_bits1(gb); hdr->disable_residual_flag = get_bits1(gb); + } else { + avpriv_request_sample(s->logctx, "Unsupported RPU format 0x%x\n", hdr->rpu_format); + ff_dovi_ctx_unref(s); + return AVERROR_PATCHWELCOME; } } else { /* lack of documentation/samples */