[FFmpeg-devel] [PATCH 20/22] avcodec/dovi_rpudec: error out on strange RPU formats
Niklas Haas
ffmpeg at haasn.xyz
Sun Jul 28 13:25:25 EEST 2024
From: Niklas Haas <git at haasn.dev>
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 */
--
2.45.2
More information about the ffmpeg-devel
mailing list