diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-14 03:31:18 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-14 03:32:11 +0400 |
commit | c3417ed7fd9239b349921ea15228682586daba88 (patch) | |
tree | 17b4f88cc05a105f7c708d5992e8ac1c2f436cf5 /libswscale/utils.c | |
parent | c683e6aa2c698a5b347d85cf662984c3776ec713 (diff) |
swscale/utils: Add check that ensures that the hardcoded struct offsets are valid
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r-- | libswscale/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c index eda1164c52..29c57119e7 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -1107,6 +1107,8 @@ SwsContext *sws_alloc_context(void) { SwsContext *c = av_mallocz(sizeof(SwsContext)); + av_assert0(offsetof(SwsContext, redDither) + DITHER32_INT == offsetof(SwsContext, dither32)); + if (c) { c->av_class = &sws_context_class; av_opt_set_defaults(c); |