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

Michael Niedermayer michaelni at gmx.at
Fri Aug 1 19:09:52 CEST 2008


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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I wish the Xiph folks would stop pretending they've got something they
do not.  Somehow I fear this will remain a wish. -- Måns Rullgård
-------------- 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/a7057d59/attachment.pgp>


More information about the FFmpeg-soc mailing list