aboutsummaryrefslogtreecommitdiff
path: root/libavformat/mp3enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer2012-08-04 19:00:44 +0200
committerMichael Niedermayer2012-08-10 17:24:39 +0200
commit7fd467f708060eb8996f2090120ca7dcb3fd9ce0 (patch)
tree395192776fc280d778fe8ee1fe812277706544cb /libavformat/mp3enc.c
parent22d804b7f0da5e3cb72860a8e337007abbb9e276 (diff)
mp3/mp2: identify the video codecs as APIC through query_codec.
Fixes Ticket1408 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mp3enc.c')
-rw-r--r--libavformat/mp3enc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 0ce1ddc750..a515fb1f54 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -370,6 +370,17 @@ static int mp2_write_trailer(struct AVFormatContext *s)
return 0;
}
+static int query_codec(enum CodecID id, int std_compliance)
+{
+ CodecMime *cm= ff_id3v2_mime_tags;
+ while(cm->id != CODEC_ID_NONE) {
+ if(id == cm->id)
+ return MKTAG('A', 'P', 'I', 'C');
+ cm++;
+ }
+ return -1;
+}
+
#if CONFIG_MP2_MUXER
AVOutputFormat ff_mp2_muxer = {
.name = "mp2",
@@ -516,6 +527,7 @@ AVOutputFormat ff_mp3_muxer = {
.write_header = mp3_write_header,
.write_packet = mp3_write_packet,
.write_trailer = mp3_write_trailer,
+ .query_codec = query_codec,
.flags = AVFMT_NOTIMESTAMPS,
.priv_class = &mp3_muxer_class,
};