Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-08-17 16:23:20 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-08-17 16:23:20 +0400
commit27fbe31c921f49078764a69ccb701dbb767c7410 (patch)
tree5a80541540a0a72063c3fa854febb77afc6518b7 /libavformat/mp3enc.c
parentd071df888d5896031380b2b1733bd0cec833c3b6 (diff)
parent6cd9d0f77d527491d0c3626f16b8e125a8a9344b (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: Revert "avconv: use stream copy by default when possible." avconv: print stream copy information. avconv: use stream copy by default when possible. matroskaenc: vertical alignment. matroskaenc: implement query_codec() lavf: add avformat_query_codec(). lavc: add avcodec_get_type() for mapping codec_id -> type. flvenc: use int64_t to store offsets avconv: don't segfault on 0 input files. Do not write ID3v1 tags by default mpegts: log into an AVFormatContext rather than MpegTSContext. Conflicts: doc/APIchanges libavcodec/version.h libavformat/avformat.h libavformat/mp3enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mp3enc.c')
-rw-r--r--libavformat/mp3enc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 9caa65282b..7e96d47995 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -141,6 +141,7 @@ static int id3v2_put_ttag(AVFormatContext *s, const char *str1, const char *str2
typedef struct MP3Context {
const AVClass *class;
int id3v2_version;
+ int write_id3v1;
int64_t frames_offset;
int32_t frames;
int32_t size;
@@ -156,7 +157,7 @@ static int mp2_write_trailer(struct AVFormatContext *s)
MP3Context *mp3 = s->priv_data;
/* write the id3v1 tag */
- if (id3v1_create_tag(s, buf) > 0) {
+ if (mp3 && mp3->write_id3v1 && id3v1_create_tag(s, buf) > 0) {
avio_write(s->pb, buf, ID3v1_TAG_SIZE);
}
@@ -190,6 +191,8 @@ AVOutputFormat ff_mp2_muxer = {
static const AVOption options[] = {
{ "id3v2_version", "Select ID3v2 version to write. Currently 3 and 4 are supported.",
offsetof(MP3Context, id3v2_version), FF_OPT_TYPE_INT, {.dbl = 4}, 3, 4, AV_OPT_FLAG_ENCODING_PARAM},
+ { "write_id3v1", "Enable ID3v1 writing. ID3v1 tags are written in UTF-8 which may not be supported by most software.",
+ offsetof(MP3Context, write_id3v1), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM},
{ NULL },
};