Commit 4749b5c7 authored by cehoyos's avatar cehoyos

Add id3v2 metadata conversion table and use it in mp3 muxer.

Patch by Anton Khirnov, wyskas gmail


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20073 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8e502442
......@@ -242,3 +242,22 @@ void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags)
av_log(s, AV_LOG_INFO, "ID3v2.%d tag skipped, cannot handle %s\n", version, reason);
url_fskip(s->pb, len);
}
const AVMetadataConv ff_id3v2_metadata_conv[] = {
{ "TALB", "album"},
{ "TCOM", "composer"},
{ "TCON", "genre"},
{ "TCOP", "copyright"},
{ "TDRL", "date"},
{ "TENC", "encoder"},
{ "TIT2", "title"},
{ "TLAN", "language"},
{ "TPE1", "author"},
{ "TPOS", "disc"},
{ "TPUB", "publisher"},
{ "TRCK", "track"},
{ "TSOA", "albumsort"},
{ "TSOP", "authorsort"},
{ "TSOT", "titlesort"},
{ 0 }
};
......@@ -24,6 +24,7 @@
#include <stdint.h>
#include "avformat.h"
#include "metadata.h"
#define ID3v2_HEADER_SIZE 10
......@@ -51,4 +52,6 @@ void ff_id3v2_parse(AVFormatContext *s, int len, uint8_t version, uint8_t flags)
*/
void ff_id3v2_read(AVFormatContext *s);
extern const AVMetadataConv ff_id3v2_metadata_conv[];
#endif /* AVFORMAT_ID3V2_H */
......@@ -341,5 +341,6 @@ AVOutputFormat mp3_muxer = {
mp3_write_header,
mp3_write_packet,
mp3_write_trailer,
.metadata_conv = ff_id3v2_metadata_conv,
};
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment