[FFmpeg-devel] [PATCH 22/22] avcodec/libx265: raise strictness of missing DV error

Niklas Haas ffmpeg at haasn.xyz
Sun Jul 28 13:25:27 EEST 2024


From: Niklas Haas <git at haasn.dev>

See previous commit for justification
---
 libavcodec/libx265.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index 718bd21b20..325c4fdd07 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -792,9 +792,11 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
             }
         } else if (ctx->dovi.cfg.dv_profile) {
             av_log(avctx, AV_LOG_ERROR, "Dolby Vision enabled, but received frame "
-                   "without AV_FRAME_DATA_DOVI_METADATA");
-            free_picture(ctx, &x265pic);
-            return AVERROR_INVALIDDATA;
+                   "without AV_FRAME_DATA_DOVI_METADATA\n");
+            if (avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT) {
+                free_picture(ctx, &x265pic);
+                return AVERROR_INVALIDDATA;
+            }
         }
 #endif
     }
-- 
2.45.2



More information about the ffmpeg-devel mailing list