[FFmpeg-devel] [PATCH 5/7] ffmpeg: dynamically allocate stream_maps

Aurelien Jacobs aurel
Sun Aug 29 01:49:01 CEST 2010


On Fri, Aug 20, 2010 at 09:37:35PM +0200, Aurelien Jacobs wrote:
> On Fri, Aug 20, 2010 at 09:36:05PM +0200, Aurelien Jacobs wrote:
> > On Fri, Aug 20, 2010 at 12:10:23AM +0200, Michael Niedermayer wrote:
> > > On Thu, Aug 19, 2010 at 03:55:20PM +0200, Aurelien Jacobs wrote:
> > > > On Thu, Aug 19, 2010 at 02:41:37PM +0100, M?ns Rullg?rd wrote:
> > > > > Aurelien Jacobs <aurel at gnuage.org> writes:
> > > > > 
> > > > > > On Wed, Aug 18, 2010 at 10:57:41PM +0200, Michael Niedermayer wrote:
> > > > > >> On Fri, Aug 13, 2010 at 08:24:18PM +0200, Aur?lien Jacobs wrote:
> > > > > >> > From: Aurelien Jacobs <aurel at gnuage.org>
> > > > > >> > 
> > > > > >> > ---
> > > > > >> >  ffmpeg.c |    8 +++++---
> > > > > >> >  1 files changed, 5 insertions(+), 3 deletions(-)
> > > > > >> > 
> > > > > >> > diff --git a/ffmpeg.c b/ffmpeg.c
> > > > > >> > index dcaaecf..9e55f01 100644
> > > > > >> > --- a/ffmpeg.c
> > > > > >> > +++ b/ffmpeg.c
> > > > > >> > @@ -117,8 +117,8 @@ static AVCodec **output_codecs = NULL;
> > > > > >> >  static int nb_output_files = 0;
> > > > > >> >  static int nb_output_codecs = 0;
> > > > > >> >  
> > > > > >> > -static AVStreamMap stream_maps[MAX_FILES*MAX_STREAMS];
> > > > > >> > -static int nb_stream_maps;
> > > > > >> > +static AVStreamMap *stream_maps = NULL;
> > > > > >> 
> > > > > >> > +static int nb_stream_maps = 0;
> > > > > >> 
> > > > > >> unneeded
> > > > > >
> > > > > > It is actually used. Hidden behind the GROW_ARRAY() macro :-(
> > > > > > So yes, I understand why you don't like such kind of macro...
> > > > > 
> > > > > He meant the =0 initialiser is unnecessary.
> > > > 
> > > > Oh, sure it is unnecessary. But almost all the other static vars in
> > > > ffmpeg.c are initialized to 0, so I did the same for consistency.
> > > > Should I remove all "static * = 0" from ffmpeg.c ?
> > > 
> > > i dont know but adding a =0 is definitly not a good idea in this patch
> > 
> > OK.
> > Updated patch attached (including inlining the GROW_ARRAY() macro).
> > Any other comment about this patch set ?
> 
> Hum... Here it is now...

If there is no other comment about this patch set, I will commit very
soon.

Aurel



More information about the ffmpeg-devel mailing list