Originally committed as revision 22987 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -421,7 +421,7 @@ static const AVOption options[]={ · 420 unmodified lines | ||
| 421 | 421 | #undef D |
| 422 | 422 | #undef DEFAULT |
| 423 | 423 | |
| 424 | −static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options }; | |
| 424 | +static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options, LIBAVUTIL_VERSION_INT }; | |
| 425 | 425 | |
| 426 | 426 | void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){ |
| 427 | 427 | int flags=0; |
| @@ -36,7 +36,7 @@ static const char *context_to_name(void *ptr) · 35 unmodified lines | ||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | static const AVOption options[] = {{NULL}}; |
| 39 | −static const AVClass audioresample_context_class = { "ReSampleContext", context_to_name, options }; | |
| 39 | +static const AVClass audioresample_context_class = { "ReSampleContext", context_to_name, options, LIBAVUTIL_VERSION_INT }; | |
| 40 | 40 | |
| 41 | 41 | struct ReSampleContext { |
| 42 | 42 | struct AVResampleContext *resample_context; |
| @@ -385,7 +385,9 @@ static const char *filter_name(void *p) · 384 unmodified lines | ||
| 385 | 385 | |
| 386 | 386 | static const AVClass avfilter_class = { |
| 387 | 387 | "AVFilter", |
| 388 | − filter_name | |
| 388 | + filter_name, | |
| 389 | + NULL, | |
| 390 | + LIBAVUTIL_VERSION_INT, | |
| 389 | 391 | }; |
| 390 | 392 | |
| 391 | 393 | AVFilterContext *avfilter_open(AVFilter *filter, const char *inst_name) |
| @@ -41,7 +41,7 @@ static const char *urlcontext_to_name(void *ptr) · 40 unmodified lines | ||
| 41 | 41 | } |
| 42 | 42 | static const AVOption options[] = {{NULL}}; |
| 43 | 43 | static const AVClass urlcontext_class = |
| 44 | − { "URLContext", urlcontext_to_name, options }; | |
| 44 | + { "URLContext", urlcontext_to_name, options, LIBAVUTIL_VERSION_INT }; | |
| 45 | 45 | /*@}*/ |
| 46 | 46 | #endif |
| 47 | 47 | |
| @@ -66,7 +66,7 @@ static const AVOption options[]={ · 65 unmodified lines | ||
| 66 | 66 | #undef D |
| 67 | 67 | #undef DEFAULT |
| 68 | 68 | |
| 69 | −static const AVClass av_format_context_class = { "AVFormatContext", format_to_name, options }; | |
| 69 | +static const AVClass av_format_context_class = { "AVFormatContext", format_to_name, options, LIBAVUTIL_VERSION_INT }; | |
| 70 | 70 | |
| 71 | 71 | static void avformat_get_context_defaults(AVFormatContext *s) |
| 72 | 72 | { |
| @@ -40,7 +40,7 @@ · 39 unmodified lines | ||
| 40 | 40 | #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c) |
| 41 | 41 | |
| 42 | 42 | #define LIBAVUTIL_VERSION_MAJOR 50 |
| 43 | −#define LIBAVUTIL_VERSION_MINOR 14 | |
| 43 | +#define LIBAVUTIL_VERSION_MINOR 15 | |
| 44 | 44 | #define LIBAVUTIL_VERSION_MICRO 0 |
| 45 | 45 | |
| 46 | 46 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |
| @@ -48,6 +48,14 @@ typedef struct { · 47 unmodified lines | ||
| 48 | 48 | * @see av_set_default_options() |
| 49 | 49 | */ |
| 50 | 50 | const struct AVOption *option; |
| 51 | + | |
| 52 | + /** | |
| 53 | + * LIBAVUTIL_VERSION with which this structure was created. | |
| 54 | + * This is used to allow fields to be added without requireing major | |
| 55 | + * version bumps everywhere. | |
| 56 | + */ | |
| 57 | + | |
| 58 | + int version; | |
| 51 | 59 | } AVClass; |
| 52 | 60 | |
| 53 | 61 | /* av_log API */ |