[FFmpeg-cvslog] avcodec/dovi_rpudec: error out on strange RPU formats

Niklas Haas git at videolan.org
Fri Aug 16 12:52:24 EEST 2024


ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Thu Jul 18 20:54:31 2024 +0200| [7b723ebd5a6c355669aab774b3b1988d298a7472] | committer: Niklas Haas

avcodec/dovi_rpudec: error out on strange RPU formats

Better safe than sorry.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b723ebd5a6c355669aab774b3b1988d298a7472
---

 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 */



More information about the ffmpeg-cvslog mailing list