[FFmpeg-cvslog] avcodec/videotoolbox: Fix undefined symbol with minimal configuration

Limin Wang git at videolan.org
Wed Jan 5 03:27:40 EET 2022


ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Tue Jan  4 17:03:45 2022 +0800| [46f43f222e891a3da704ec711e859d13c2e9b5c6] | committer: Limin Wang

avcodec/videotoolbox: Fix undefined symbol with minimal configuration

Please reproduced with the following minimal configure command:
./configure --enable-shared --disable-all --enable-avcodec --enable-decoder=h264 --enable-hwaccel=h264_videotoolbox

You'll get below error:

Undefined symbols for architecture x86_64:
  "_ff_videotoolbox_vpcc_extradata_create", referenced from:
      _videotoolbox_start in videotoolbox.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Reported-by: Cameron Gutman <aicommander at gmail.com>
Tested-by: Cameron Gutman <aicommander at gmail.com>
Signed-off-by: Limin Wang <lance.lmwang at gmail.com>

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

 libavcodec/videotoolbox.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index 69beb3881f..51d4eacfd8 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -825,11 +825,13 @@ static CFDictionaryRef videotoolbox_decoder_config_create(CMVideoCodecType codec
         if (data)
             CFDictionarySetValue(avc_info, CFSTR("hvcC"), data);
         break;
+#if CONFIG_VP9_VIDEOTOOLBOX_HWACCEL
     case kCMVideoCodecType_VP9 :
         data = ff_videotoolbox_vpcc_extradata_create(avctx);
         if (data)
             CFDictionarySetValue(avc_info, CFSTR("vpcC"), data);
         break;
+#endif
     default:
         break;
     }



More information about the ffmpeg-cvslog mailing list