[FFmpeg-cvslog] Undeprecate av_opt_set_defaults2().

Ronald S. Bultje git at videolan.org
Tue Aug 18 19:26:20 CEST 2015


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Sun Aug 16 19:40:48 2015 -0400| [3285005347b2980fc078d4b5777844070bb6113b] | committer: Ronald S. Bultje

Undeprecate av_opt_set_defaults2().

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

 libavutil/opt.c |    5 +----
 libavutil/opt.h |   12 +++++++++---
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 62db1b5..580586e 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1177,20 +1177,17 @@ int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags)
 
 void av_opt_set_defaults(void *s)
 {
-#if FF_API_OLD_AVOPTIONS
     av_opt_set_defaults2(s, 0, 0);
 }
 
 void av_opt_set_defaults2(void *s, int mask, int flags)
 {
-#endif
     const AVOption *opt = NULL;
     while ((opt = av_opt_next(s, opt))) {
         void *dst = ((uint8_t*)s) + opt->offset;
-#if FF_API_OLD_AVOPTIONS
+
         if ((opt->flags & mask) != flags)
             continue;
-#endif
 
         if (opt->flags & AV_OPT_FLAG_READONLY)
             continue;
diff --git a/libavutil/opt.h b/libavutil/opt.h
index 481d096..4f2b46e 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -441,10 +441,16 @@ int av_opt_show2(void *obj, void *av_log_obj, int req_flags, int rej_flags);
  */
 void av_opt_set_defaults(void *s);
 
-#if FF_API_OLD_AVOPTIONS
-attribute_deprecated
+/**
+ * Set the values of all AVOption fields to their default values. Only these
+ * AVOption fields for which (opt->flags & mask) == flags will have their
+ * default applied to s.
+ *
+ * @param s an AVOption-enabled struct (its first member must be a pointer to AVClass)
+ * @param mask combination of AV_OPT_FLAG_*
+ * @param flags combination of AV_OPT_FLAG_*
+ */
 void av_opt_set_defaults2(void *s, int mask, int flags);
-#endif
 
 /**
  * Parse the key/value pairs list in opts. For each key/value pair



More information about the ffmpeg-cvslog mailing list