[FFmpeg-devel] [PATCH] mp3 muxer: write all metadata

Anton Khirnov wyskas
Wed Sep 30 09:02:14 CEST 2009


On Tue, Sep 29, 2009 at 01:29:35AM +0200, Michael Niedermayer wrote:
> 
> an array of char[4] would be smaller than an array of pointers to strings
> 
done
> 
> [...]
> >      put_be32(s->pb, MKBETAG('I', 'D', '3', 0x04)); /* ID3v2.4 */
> >      put_byte(s->pb, 0);
> >      put_byte(s->pb, 0); /* flags */
> >  
> > +    /* reserve space for size */
> > +    size_pos = url_ftell(s->pb);
> > +    put_be32(s->pb, 0);
> > +
> > +    while ((t = av_metadata_get(s->metadata, "", t, AV_METADATA_IGNORE_SUFFIX))) {
> > +        uint32_t tag = 0;
> > +
> > +        if (t->key[0] == 'T' && strcmp(t->key, "TSSE")) {
> > +            int i;
> > +            for (i = 0; ff_id3v2_tags[i]; i++)
> > +                if (!strcmp(t->key, ff_id3v2_tags[i])) {
> 
> > +                    tag = MKBETAG(t->key[0], t->key[1], t->key[2], t->key[3]);
> 
> AV_RB32()
> 
done

btw these could use some documentation

Anton Khirnov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mp3-muxer-write-all-metadata.patch
Type: text/x-diff
Size: 6843 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090930/97e46714/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090930/97e46714/attachment.pgp>



More information about the ffmpeg-devel mailing list