diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-19 05:00:26 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-03-22 23:57:19 +0100 |
commit | eb3ee7f141d33e2133697919ee91352cfad388b0 (patch) | |
tree | 97a1413769c7e0d2752eddc5e4be68e3b98aa7ef | |
parent | d11b5e6096b888caa7e6c4d159f6c0c44d0ca83d (diff) | |
download | ffmpeg-eb3ee7f141d33e2133697919ee91352cfad388b0.tar.gz |
avformat/mp3enc: Improve query_codec
Signal that anything except MP3 and the ID3V2 attached pic types
are forbidden.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavformat/mp3enc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index cb250a46ca..4a02a45069 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -495,12 +495,16 @@ static int mp3_write_trailer(struct AVFormatContext *s) static int query_codec(enum AVCodecID id, int std_compliance) { const CodecMime *cm= ff_id3v2_mime_tags; + + if (id == AV_CODEC_ID_MP3) + return 1; + while(cm->id != AV_CODEC_ID_NONE) { if(id == cm->id) return MKTAG('A', 'P', 'I', 'C'); cm++; } - return -1; + return 0; } static const AVOption options[] = { |