[Ffmpeg-cvslog] r6251 - in trunk: libavcodec/utils.c libavformat/utils.c
Rich Felker
dalias
Thu Sep 14 17:37:05 CEST 2006
On Thu, Sep 14, 2006 at 03:51:55PM +0200, takis wrote:
> Author: takis
> Date: Thu Sep 14 15:51:54 2006
> New Revision: 6251
>
> Modified:
> trunk/libavcodec/utils.c
> trunk/libavformat/utils.c
>
> Log:
> Make OFFSET() reuse offsetof
>
>
> Modified: trunk/libavcodec/utils.c
> ==============================================================================
> --- trunk/libavcodec/utils.c (original)
> +++ trunk/libavcodec/utils.c Thu Sep 14 15:51:54 2006
> @@ -438,7 +438,7 @@
> return "NULL";
> }
>
> -#define OFFSET(x) (int)&((AVCodecContext*)0)->x
> +#define OFFSET(x) offsetof(AVCodecContext,x)
Just so you know, offsetof returns size_t which is _unsigned_. It's
somewhat unlikely this will break any code using the OFFSET macro, but
not entirely impossible...
Rich
More information about the ffmpeg-cvslog
mailing list