[FFmpeg-devel] [PATCH] change the order of params for av_init_random()
Diego Biurrun
diego
Mon Jan 12 23:54:46 CET 2009
On Mon, Jan 12, 2009 at 09:56:33PM +0100, Stefano Sabatini wrote:
> On date Tuesday 2009-01-06 23:01:27 +0100, Stefano Sabatini encoded:
> >
> > Just a note regarding the first patch
> > "change-ffserver-include-order.patch".
> >
> > This is required since in order to deprecate av_init_random() I need
> > to include libavutil/common.h in random.h, which defines
> > attribute_deprecated but also other macros which are defined
> > conditionally with respect to LIBAVFORMAT_BUILD:
> >
> > Check in libavutil/internal.h:
> >
> > #ifndef LIBAVFORMAT_BUILD
> > #undef printf
> > #define printf please_use_av_log
> > #undef fprintf
> > #define fprintf please_use_av_log
> > #undef puts
> > #define puts please_use_av_log
> > #undef perror
> > #define perror please_use_av_log_instead_of_perror
> > #endif
> >
> > If libavutil/random.h is defined before libavutil/avformat.h,
> > LIBAVFORMAT_BUILD is undefined when that is included and those macros
> > will be defined, resulting in a linking error, since ffserver uses
> > printf and friends.
> >
> > Making ffserver include avformat.h before the other headers files
> > ensures that the LIBAVFORMAT_BUILD symbol is defined before to
> > include the other files.
>
> Ping?
I think changing the #include order is not a big deal. Just add a
comment that explains why they are in this particular order.
Diego
More information about the ffmpeg-devel
mailing list