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;
*/
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