[FFmpeg-devel] [PATCH] fix circular #include in libavutil

Aurelien Jacobs aurel
Sun Aug 2 22:00:53 CEST 2009


On Sun, Aug 02, 2009 at 06:13:32PM +0200, Diego Biurrun wrote:
> common.h #includes mem.h, which #includes common.h.
> 
> [...]
> 
> Index: libavutil/common.h
> ===================================================================
> --- libavutil/common.h	(revision 19565)
> +++ libavutil/common.h	(working copy)
> @@ -281,8 +281,6 @@
>          }\
>      }
>  
> -#include "mem.h"
> -
>  #ifdef HAVE_AV_CONFIG_H
>  #    include "internal.h"
>  #endif /* HAVE_AV_CONFIG_H */

This will work fine when compiling ffmpeg because common.h continue to
include internal.h which itslef includes mem.h.
But this will break public API. I guess many software relies on the fact
that common.h include mem.h.

Aurel



More information about the ffmpeg-devel mailing list