Message ID | 20200909060217.25794-12-rcombs@rcombs.me |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,01/15] lavc/codec_desc: add MIME type to AV_CODEC_ID_TEXT | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index a3586e1f86..eb8cc2e22f 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -489,12 +489,9 @@ 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; - while(cm->id != AV_CODEC_ID_NONE) { - if(id == cm->id) - return MKTAG('A', 'P', 'I', 'C'); - cm++; - } + const AVCodecDescriptor *desc = avcodec_descriptor_get(id); + if (desc && desc->type == AVMEDIA_TYPE_VIDEO && desc->mime_types) + return MKTAG('A', 'P', 'I', 'C'); return -1; }