[FFmpeg-devel] [PATCH] Store Major brand, Minor version and compatible brands of a mov file using the metadata API
Diego Biurrun
diego
Wed Sep 9 10:50:22 CEST 2009
On Wed, Sep 09, 2009 at 10:03:04AM +0300, haim alon wrote:
>
> On Tue, Sep 8, 2009 at 8:34 PM, Baptiste Coudurier wrote:
>
> > On 09/08/2009 04:55 AM, haim alon wrote:
> >
> > Please make the patch coding style and variable naming scheme matching the
> > one used in the same file.
Please heed Baptiste's request. Don't just mechanically make exactly
the changes you are told to make, look for yourself if there are
similar changes that you need to make in other places.
> > compat_brand, minor_ver, etc...
> >
> Done
No.
> >> --- libavformat/mov.c (revision 19787)
> >> +++ libavformat/mov.c (working copy)
> >> @@ -485,15 +485,51 @@
> > + av_metadata_set(&c->fc->metadata, "MajorBrand", majorBrandStr);
> >
> > "major_brand"
> >
> Done
No.
> > + minorVer = get_be32(pb); /*minor version*/
> >> + snprintf(minorVerStr, sizeof(minorVerStr), "%d", minorVer);
> >> + av_metadata_set(&c->fc->metadata, "MinorVersion", minorVerStr);
> >
> > "minor_version"
> >
> Done
No.
> >> + if (nextCompBrandPtr[0]&& nextCompBrandPtr[1]&& nextCompBrandPtr[2]&& nextCompBrandPtr[3]) // check that char is legal - not NULL
> >> + {
> >> + memcpy(currCompBrandPtr,&nextCompBrand, 4);
> >> + currCompBrandPtr += 4;
> >> + }
> >> + else
> >> + {
> >> + av_log(c->fc, AV_LOG_WARNING, "compatible brand name contains illegal character - skipped.\n");
> >> + numCompBrand -= 1; /* reduce counter since brand is skipped */
> >> + }
> >
> > Brace placements.
> >
> Done
No.
> > + }
> >> + *currCompBrandPtr = '\0';
> >> + av_metadata_set(&c->fc->metadata, "CompatibleBrands", compBrandsStr);
> >
> > compatible_brands
> >
> Done
No.
> Attached an updated patch.
Try again please, this time follow the style in the file, don't force
your personal style upon it.
Diego
More information about the ffmpeg-devel
mailing list