[FFmpeg-devel] [RFC] Global or local variables in ffmpeg.c
Sat Sep 15 23:26:22 CEST 2007
On Sat, Sep 15, 2007 at 04:14:52PM -0300, Ramiro Polla wrote:
> In , it was discussed whether variables passed to av_encode would be
> passed as arguments or used as globals.
> Since the beginning of ffmpeg, they have been defined globals, are
> passed as arguments to av_encode, and av_encode uses the same local name
> as the global variables for them.
> The arguments to av_encode are useless. Regression tests still pass for
> I'm trying to finish Limin Wang's work to split av_encode, but don't
> know which way to go.
> Which way is preferable: making everything global variables and have
> parameter-less functions in ffmpeg.c, or passing something like
> AVTranscodeContext to av_encode and other functions?
both are silly
a function should take sensible arguments
str= "%d %d\n"
is as idiotic as
s.str= "%d %d\n"
both are a huge step backward from the current
static int av_encode(AVFormatContext **output_files,
AVStreamMap *stream_maps, int nb_stream_maps)
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel