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

Michael Niedermayer michaelni at gmx.at
Fri Aug 1 19:31:47 CEST 2008


On Sat, Aug 02, 2008 at 01:22:26AM +0800, zhentan feng wrote:
> 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 ;)

umm, i see, well a variable static array is definitly not ok.
maybe a local array in mxf_build_structural_metadata() would be
a possibility?
Or maybe baptiste has some better idea?

[...]
-- 
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
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20080801/0b376670/attachment.pgp>


More information about the FFmpeg-soc mailing list