Unified · Split
| @@ -13,6 +13,9 @@ libavutil: 2011-04-18 · 12 unmodified lines | |||
| 13 | 13 | ||
| 14 | API changes, most recent first: | 14 | API changes, most recent first: |
| 15 | 15 | ||
| 16 | 2011-06-xx - xxxxxxx - lavu 51.3.0 - opt.h | ||
| 17 | Add av_opt_free convenience function. | ||
| 18 | |||
| 16 | 2011-05-28 - 0420bd7 - lavu 51.2.0 - pixdesc.h | 19 | 2011-05-28 - 0420bd7 - lavu 51.2.0 - pixdesc.h |
| 17 | Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate | 20 | Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate |
| 18 | avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor. | 21 | avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor. |
| @@ -40,7 +40,7 @@ · 39 unmodified lines | |||
| 40 | #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) | 40 | #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) |
| 41 | 41 | ||
| 42 | #define LIBAVUTIL_VERSION_MAJOR 51 | 42 | #define LIBAVUTIL_VERSION_MAJOR 51 |
| 43 | #define LIBAVUTIL_VERSION_MINOR 2 | 43 | #define LIBAVUTIL_VERSION_MINOR 3 |
| 44 | #define LIBAVUTIL_VERSION_MICRO 0 | 44 | #define LIBAVUTIL_VERSION_MICRO 0 |
| 45 | 45 | ||
| 46 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ | 46 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |
| @@ -520,6 +520,14 @@ int av_set_options_string(void *ctx, const char *opts, · 519 unmodified lines | |||
| 520 | return count; | 520 | return count; |
| 521 | } | 521 | } |
| 522 | 522 | ||
| 523 | void av_opt_free(void *obj) | ||
| 524 | { | ||
| 525 | const AVOption *o = NULL; | ||
| 526 | while ((o = av_next_option(obj, o))) | ||
| 527 | if (o->type == FF_OPT_TYPE_STRING || o->type == FF_OPT_TYPE_BINARY) | ||
| 528 | av_freep((uint8_t *)obj + o->offset); | ||
| 529 | } | ||
| 530 | |||
| 523 | #ifdef TEST | 531 | #ifdef TEST |
| 524 | 532 | ||
| 525 | #undef printf | 533 | #undef printf |
| @@ -176,4 +176,9 @@ void av_opt_set_defaults2(void *s, int mask, int flags); · 175 unmodified lines | |||
| 176 | int av_set_options_string(void *ctx, const char *opts, | 176 | int av_set_options_string(void *ctx, const char *opts, |
| 177 | const char *key_val_sep, const char *pairs_sep); | 177 | const char *key_val_sep, const char *pairs_sep); |
| 178 | 178 | ||
| 179 | /** | ||
| 180 | * Free all string and binary options in obj. | ||
| 181 | */ | ||
| 182 | void av_opt_free(void *obj); | ||
| 183 | |||
| 179 | #endif /* AVUTIL_OPT_H */ | 184 | #endif /* AVUTIL_OPT_H */ |