--- libavformat/mp3enc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
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; } -- 2.27.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".