From 982c60c67c01eb6de5c408512e5d4e6d6589f57a Mon Sep 17 00:00:00 2001 From: SachinVin Date: Sat, 17 Jun 2023 19:50:40 +0530 Subject: [PATCH] common\dynamic_library\ffmpeg.{cpp, h}: fix version check for av_opt_child_class_iterate --- src/common/dynamic_library/ffmpeg.cpp | 4 ++-- src/common/dynamic_library/ffmpeg.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/dynamic_library/ffmpeg.cpp b/src/common/dynamic_library/ffmpeg.cpp index 0a1f0a280..1da17faf4 100644 --- a/src/common/dynamic_library/ffmpeg.cpp +++ b/src/common/dynamic_library/ffmpeg.cpp @@ -31,7 +31,7 @@ av_hwframe_ctx_init_func av_hwframe_ctx_init; av_hwframe_get_buffer_func av_hwframe_get_buffer; av_hwframe_transfer_data_func av_hwframe_transfer_data; av_int_list_length_for_size_func av_int_list_length_for_size; -#if LIBAVCODEC_VERSION_MAJOR >= 59 +#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(56, 53, 100) // lavu 56.53.100 av_opt_child_class_iterate_func av_opt_child_class_iterate; #else av_opt_child_class_next_func av_opt_child_class_next; @@ -166,7 +166,7 @@ static bool LoadAVUtil() { LOAD_SYMBOL(avutil, av_hwframe_get_buffer); LOAD_SYMBOL(avutil, av_hwframe_transfer_data); LOAD_SYMBOL(avutil, av_int_list_length_for_size); -#if LIBAVCODEC_VERSION_MAJOR >= 59 +#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(56, 53, 100) // lavu 56.53.100 LOAD_SYMBOL(avutil, av_opt_child_class_iterate); #else LOAD_SYMBOL(avutil, av_opt_child_class_next); diff --git a/src/common/dynamic_library/ffmpeg.h b/src/common/dynamic_library/ffmpeg.h index 023847179..67eac1787 100644 --- a/src/common/dynamic_library/ffmpeg.h +++ b/src/common/dynamic_library/ffmpeg.h @@ -47,7 +47,7 @@ typedef int (*av_hwframe_ctx_init_func)(AVBufferRef*); typedef int (*av_hwframe_get_buffer_func)(AVBufferRef*, AVFrame*, int); typedef int (*av_hwframe_transfer_data_func)(AVFrame*, const AVFrame*, int); typedef unsigned (*av_int_list_length_for_size_func)(unsigned, const void*, uint64_t); -#if LIBAVCODEC_VERSION_MAJOR >= 59 +#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(56, 53, 100) // lavu 56.53.100 typedef const AVClass* (*av_opt_child_class_iterate_func)(const AVClass*, void**); #else typedef const AVClass* (*av_opt_child_class_next_func)(const AVClass*, const AVClass*); @@ -85,7 +85,7 @@ extern av_hwframe_ctx_init_func av_hwframe_ctx_init; extern av_hwframe_get_buffer_func av_hwframe_get_buffer; extern av_hwframe_transfer_data_func av_hwframe_transfer_data; extern av_int_list_length_for_size_func av_int_list_length_for_size; -#if LIBAVCODEC_VERSION_MAJOR >= 59 +#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(56, 53, 100) // lavu 56.53.100 extern av_opt_child_class_iterate_func av_opt_child_class_iterate; #else extern av_opt_child_class_next_func av_opt_child_class_next;