PR #24663 opened by Werner Robitza (slhck)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24663
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24663.patch

# Summary of changes

openapv 1.1 changed oapvm_create() to take a descriptor argument.

This enables backwards compatibility.

This was first raised here:

https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/235



>From 4415b643361f642bd257a9c214020bd56b7ee8d3 Mon Sep 17 00:00:00 2001
From: Werner Robitza <[email protected]>
Date: Thu, 24 Sep 2026 11:11:36 +0200
Subject: [PATCH] avcodec/liboapvenc: fix build with openapv >= 1.1

openapv 1.1 changed oapvm_create() to take a descriptor argument.
This was first raised here:
https://github.com/homebrew-ffmpeg/homebrew-ffmpeg/issues/235
---
 libavcodec/liboapvenc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/liboapvenc.c b/libavcodec/liboapvenc.c
index 22a8ac4890..32a8cd5f1c 100644
--- a/libavcodec/liboapvenc.c
+++ b/libavcodec/liboapvenc.c
@@ -477,6 +477,9 @@ static av_cold int liboapve_init(AVCodecContext *avctx)
 {
     ApvEncContext *apv = avctx->priv_data;
     oapve_cdesc_t *cdsc = &apv->cdsc;
+#if OAPV_VER_APISET >= 1
+    oapvm_cdesc_t mcdsc = { 0 };
+#endif
     unsigned char *bs_buf;
     int ret;
 
@@ -509,7 +512,11 @@ static av_cold int liboapve_init(AVCodecContext *avctx)
     }
 
     /* create metadata handler */
+#if OAPV_VER_APISET >= 1
+    apv->mid = oapvm_create(&mcdsc, &ret);
+#else
     apv->mid = oapvm_create(&ret);
+#endif
     if (apv->mid == NULL || OAPV_FAILED(ret)) {
         av_log(avctx, AV_LOG_ERROR, "cannot create OAPV metadata handler\n");
         return AVERROR_EXTERNAL;
-- 
2.52.0

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to