# HG changeset patch # User takis # Date 1158241914 0 # Node ID a565d89ff0320319b6cdabfa426c0b039155d779 # Parent 73626972ccbbb8cfc61f34b5470c2c1de025b811 Make OFFSET() reuse offsetof diff -r 73626972ccbb -r a565d89ff032 utils.c --- a/utils.c Thu Sep 14 11:23:41 2006 +0000 +++ b/utils.c Thu Sep 14 13:51:54 2006 +0000 @@ -438,7 +438,7 @@ return "NULL"; } -#define OFFSET(x) (int)&((AVCodecContext*)0)->x +#define OFFSET(x) offsetof(AVCodecContext,x) #define DEFAULT 0 //should be NAN but it doesnt work as its not a constant in glibc as required by ANSI/ISO C //these names are too long to be readable #define V AV_OPT_FLAG_VIDEO_PARAM