[FFmpeg-devel] [PATCH] change the order of params for av_init_random()

Stefano Sabatini stefano.sabatini-lala
Wed Jan 14 00:38:10 CET 2009


On date Monday 2009-01-12 23:54:46 +0100, Diego Biurrun encoded:
> 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.

I did it.

As for the other patches I think is safe to commit them too, as the
original patch was already OKed, I'll wait a week and I'll commit them
unless there will be objections.

Regards.
-- 
FFmpeg = Fiendish Fostering Mystic Pitiless Elastic Geisha




More information about the ffmpeg-devel mailing list