[FFmpeg-devel] [PATCH] Encode Year ID3v2 tag for mp3 files
Måns Rullgård
mans
Wed Nov 14 00:51:35 CET 2007
Patrice Bensoussan <patrice.bensoussan at free.fr> writes:
> Hello,
>
> Here is a patch to encode the year information on mp3 files using
> ID3v2 tag which was missing.
> Patrice
>
> PS: resubmitting patch from the email address registered on the
> mailing list, please disregard previous email, sorry about that...
>
>
> Index: libavformat/mp3.c
> ===================================================================
> --- libavformat/mp3.c (revision 11006)
> +++ libavformat/mp3.c (working copy)
> @@ -582,9 +582,12 @@
> {
> int totlen = 0;
> char tracktxt[10];
> + char yeartxt[10];
>
> if(s->track)
> snprintf(tracktxt, sizeof(tracktxt) - 1, "%d", s->track);
> + if(s->year)
> + snprintf(yeartxt, sizeof(yeartxt) - 1, "%d", s->year);
The -1 is unnecessary.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list