[FFmpeg-soc] [soc]: r2892 - mxf/mxfenc.c
zhentan feng
spyfeng at gmail.com
Wed Jul 30 16:12:03 CEST 2008
Hi
2008/7/30 Aurelien Jacobs <aurel at gnuage.org>
> spyfeng wrote:
>
> > Author: spyfeng
> > Date: Tue Jul 29 15:45:34 2008
> > New Revision: 2892
> >
> > Log:
> > simplify mxf_generate_uuid()
> >
> >
> > Modified:
> > mxf/mxfenc.c
> >
> > Modified: mxf/mxfenc.c
> >
> ==============================================================================
> > --- mxf/mxfenc.c (original)
> > +++ mxf/mxfenc.c Tue Jul 29 15:45:34 2008
> > @@ -230,21 +230,16 @@ static void mxf_generate_uuid(AVFormatCo
> >
> > for (i = 0; i < 16; i++) {
> > rand_num = av_random(&mxf->random_state);
> > - rand_num = rand_num & 0x00ff;
> > -
> > - // the 7th byte is version according to ISO 11578
> > - if (i == 6) {
> > - rand_num &= 0x0f;
> > - rand_num |= 0x40;
> > - }
> > -
> > - // the 8th byte is variant for current use according to ISO
> 11578
> > - if (i == 8) {
> > - rand_num &= 0x3f;
> > - rand_num |= 0x80;
> > - }
> > + rand_num &= 0x00ff;
> > uuid[i] = rand_num;
> > }
> > + // the 7th byte is version according to ISO 11578
> > + uuid[6] &= 0x0f;
> > + uuid[6] &= 0x40;
>
> This is not equivalent to the previous code (& vs. |), and
> your new code is basically the same as uuid[6]=0;
>
>
yes, this is typing mistake, thanks.
--
Best wishes~
More information about the FFmpeg-soc
mailing list