diff mbox series

[FFmpeg-devel] avutil: deprecate AVRational field inside AVOption::default_val

Message ID tencent_C74EC170412D349A3C407A9A9E9F66ABE708@qq.com
State New
Headers show
Series [FFmpeg-devel] avutil: deprecate AVRational field inside AVOption::default_val
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

zhilizhao(赵志立) Oct. 21, 2021, 9:23 a.m. UTC
It's not being used. For backward compatibility, AV_OPT_TYPE_RATIONAL
cannot be changed to use it.
---
 libavutil/opt.h     | 2 ++
 libavutil/version.h | 3 +++
 2 files changed, 5 insertions(+)

Comments

zhilizhao(赵志立) Nov. 4, 2021, 8:02 a.m. UTC | #1
> On Oct 21, 2021, at 5:23 PM, Zhao Zhili <quinkblack@foxmail.com> wrote:
> 
> It's not being used. For backward compatibility, AV_OPT_TYPE_RATIONAL
> cannot be changed to use it.
> ---
> libavutil/opt.h     | 2 ++
> libavutil/version.h | 3 +++
> 2 files changed, 5 insertions(+)
> 

Ping.
diff mbox series

Patch

diff --git a/libavutil/opt.h b/libavutil/opt.h
index 2820435eec..bf1a8b84fa 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -267,8 +267,10 @@  typedef struct AVOption {
         int64_t i64;
         double dbl;
         const char *str;
+#if FF_API_AVOPTION_AVRATIONAL
         /* TODO those are unused now */
         AVRational q;
+#endif
     } default_val;
     double min;                 ///< minimum valid value for the option
     double max;                 ///< maximum valid value for the option
diff --git a/libavutil/version.h b/libavutil/version.h
index 896e348d80..4faea0cfcb 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -117,6 +117,9 @@ 
 #ifndef FF_API_AV_MALLOCZ_ARRAY
 #define FF_API_AV_MALLOCZ_ARRAY         (LIBAVUTIL_VERSION_MAJOR < 58)
 #endif
+#ifndef FF_API_AVOPTION_AVRATIONAL
+#define FF_API_AVOPTION_AVRATIONAL      (LIBAVUTIL_VERSION_MAJOR < 58)
+#endif
 
 /**
  * @}