diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-10-16 16:35:49 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-10-16 16:35:49 +0400 |
commit | b388d5e4c6d1054e9876e93e07cf49687ccf5fea (patch) | |
tree | f85a44b566ab50d651a781dfa198ae0890ad4b29 /libavcodec/opt.c | |
parent | f1cb9858b5be3865bcf17e60615f88a011607216 (diff) |
Very evil missuse of svn to test if AVOption and AVOption2 are compatible.
If this test triggers anywhere for anyone, revert this commit immedeatly.
Ill revert this in a day or 2, its just so we know beforehand if the idea
with the union is doable or not without breaking ABI/API.
Originally committed as revision 20249 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/opt.c')
-rw-r--r-- | libavcodec/opt.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/opt.c b/libavcodec/opt.c index a6abcfc2e7..3a6f1f7146 100644 --- a/libavcodec/opt.c +++ b/libavcodec/opt.c @@ -408,6 +408,19 @@ int av_opt_show(void *obj, void *av_log_obj){ void av_opt_set_defaults2(void *s, int mask, int flags) { const AVOption *opt = NULL; + + if( sizeof(AVOption) != sizeof(AVOption2) + || offsetof(AVOption,default_val) != offsetof(AVOption2,default_val.dbl) + || offsetof(AVOption,min) != offsetof(AVOption2,min) + ){ + av_log(NULL, AV_LOG_ERROR, "AVOpt1/2 missmatch %zd %zd %td %td %td %td\n", + sizeof(AVOption), sizeof(AVOption2), + offsetof(AVOption,default_val), offsetof(AVOption2,default_val.dbl), + offsetof(AVOption,min), offsetof(AVOption2,min)); +#undef exit + exit(123); + } + while ((opt = av_next_option(s, opt)) != NULL) { if((opt->flags & mask) != flags) continue; |