From c3417ed7fd9239b349921ea15228682586daba88 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 14 May 2014 01:31:18 +0200 Subject: swscale/utils: Add check that ensures that the hardcoded struct offsets are valid Signed-off-by: Michael Niedermayer --- libswscale/utils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libswscale/utils.c') 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); -- cgit v1.2.3