[FFmpeg-devel] [PATCH] Add Lame info tag to the Xing/Info header of mp3 files

Clément Bœsch u at pkh.me
Fri May 23 10:49:25 CEST 2014


On Thu, May 22, 2014 at 05:31:09PM -0700, Giovanni Motta wrote:
[...]
> +      /* extradata starts with vbr_scale */
> +      avio_seek(s->pb, lame_tag_offset, SEEK_SET);
> +
> +			/* copy the tag from extradata */
> +      avio_write(s->pb, codec->extradata, codec->extradata_size);
> +
> +			/* replace vendor string */
> +      avio_seek(s->pb, lame_tag_offset + 4, SEEK_SET);  // rewind and skip vbr_scale
> +		  for (i = 0; i < FFMIN(strlen(vendor), LAME_EXT_VENDOR_LEN); ++i)
> +		      avio_w8(s->pb, vendor[i]);
> +		  for (; i < LAME_EXT_VENDOR_LEN; ++i)
> +		      avio_w8(s->pb, 0x20);

Tabs are not allowed in FFmpeg repository.

[...]
> @@ -384,7 +452,7 @@ static int query_codec(enum AVCodecID id, int std_compliance)
>  AVOutputFormat ff_mp2_muxer = {
>      .name              = "mp2",
>      .long_name         = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
> -    .mime_type         = "audio/mpeg",
> +    .mime_type         = "audio/x-mpeg",
>      .extensions        = "mp2,m2a,mpa",
>      .audio_codec       = AV_CODEC_ID_MP2,
>      .video_codec       = AV_CODEC_ID_NONE,
> @@ -526,7 +594,7 @@ static int mp3_write_header(struct AVFormatContext *s)
>  AVOutputFormat ff_mp3_muxer = {
>      .name              = "mp3",
>      .long_name         = NULL_IF_CONFIG_SMALL("MP3 (MPEG audio layer 3)"),
> -    .mime_type         = "audio/mpeg",
> +    .mime_type         = "audio/x-mpeg",
>      .extensions        = "mp3",
>      .priv_data_size    = sizeof(MP3Context),
>      .audio_codec       = AV_CODEC_ID_MP3,

Did you partially revert fdcb2873e1c898cf26216f7e80d95d03387ba55b on
purpose, or that's due to a clumsiness because you copied an old version
of the file instead of rebasing?

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140523/20b370e2/attachment.asc>


More information about the ffmpeg-devel mailing list