[FFmpeg-soc] [soc]: r2973 - mxf/mxfenc.c

zhentan feng spyfeng at gmail.com
Fri Aug 1 19:22:26 CEST 2008


Hi

2008/8/2 Michael Niedermayer <michaelni at gmx.at>

> On Fri, Aug 01, 2008 at 06:55:59PM +0200, spyfeng wrote:
> > Author: spyfeng
> > Date: Fri Aug  1 18:55:59 2008
> > New Revision: 2973
> >
> > Log:
> > remove malloc mem for mxf->track_number_sign.
> > use static array instead.
> [...]
> > +static
> track_number_sign[sizeof(mxf_essence_element_key)/sizeof(MXFEssenceElementKey)]
> = { 0 };
> [...]
> > @@ -627,8 +624,8 @@ static int mxf_write_track(AVFormatConte
> >              if (st->codec->codec_id== element->type) {
> >                  // write track number
> >                  put_buffer(pb, element->uid + 12, 3);
> > -                put_byte(pb, element->uid[15] +
> mxf->track_number_sign[i]);
> > -                mxf->track_number_sign[i] ++;
> > +                put_byte(pb, element->uid[15] + track_number_sign[i]);
> > +                track_number_sign[i] ++;
>
> static arrays must be constant, it should be in the struct but not malloced
>

ok.
but if this, I should move MXFContext defination under the static tables
because the size of the arrary depend mxf_essence_element_key. It will looks
like a little ugly ;)





-- 
Best wishes~



More information about the FFmpeg-soc mailing list