[FFmpeg-devel] [PATCH 6/6] mp3enc: support for id3v2.3 tags using a per-muxer AVOption
Anton Khirnov
anton
Fri Jan 21 18:53:38 CET 2011
On Fri, Jan 21, 2011 at 02:51:54PM +0000, M?ns Rullg?rd wrote:
> Anton Khirnov <anton at khirnov.net> writes:
>
> > @@ -175,7 +195,9 @@ static int mp3_write_header(struct AVFormatContext *s)
> > put_be32(s->pb, 0);
> >
> > ff_metadata_conv(&s->metadata, ff_id3v2_34_metadata_conv, NULL);
> > - ff_metadata_conv(&s->metadata, ff_id3v2_4_metadata_conv, NULL);
> > + if (mp3->id3v2_version == 4)
> > + ff_metadata_conv(&s->metadata, ff_id3v2_4_metadata_conv, NULL);
> > +
>
> What about v2.3-only tags, or are there none that need processing here?
>
Yes, there are no v2.3-only tags for which we have a generic tag.
> > while ((t = av_metadata_get(s->metadata, "", t, AV_METADATA_IGNORE_SUFFIX))) {
> > int ret;
> >
> > @@ -183,7 +205,13 @@ static int mp3_write_header(struct AVFormatContext *s)
> > totlen += ret;
> > continue;
> > }
> > - if ((ret = id3v2_check_write_tag(s, t, ff_id3v2_4_tags)) > 0) {
> > + if (mp3->id3v2_version == 4 &&
> > + (ret = id3v2_check_write_tag(s, t, ff_id3v2_4_tags)) > 0) {
> > + totlen += ret;
> > + continue;
> > + }
> > + if (mp3->id3v2_version == 3 &&
> > + (ret = id3v2_check_write_tag(s, t, ff_id3v2_3_tags)) > 0) {
> > totlen += ret;
> > continue;
> > }
>
> Perhaps this would be nicer as a single call with the last argument
> determined by the version.
>
done
--
Anton Khirnov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mp3enc-support-for-id3v2.3-tags-using-a-per-muxer-AV.patch
Type: text/x-diff
Size: 3283 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110121/7ce21211/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/20110121/7ce21211/attachment.pgp>
More information about the ffmpeg-devel
mailing list