From 904b25a550cbdcffc22b6d6744da232dc1d6c54f Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Wed, 22 Apr 2020 03:42:00 +0200 Subject: [PATCH] avformat/matroskaenc: Use comparison instead of assignment This bug was introduced in 3589b3f2e217e78d16a92b372d95ce4a3f7df896. Fixes Coverity ID 1462425. Signed-off-by: Andreas Rheinhardt --- libavformat/matroskaenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 0034e225ef..784973a951 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -1733,7 +1733,7 @@ static int mkv_write_attachments(AVFormatContext *s) const AVCodecDescriptor *desc = avcodec_descriptor_get(st->codecpar->codec_id); if (desc && desc->mime_types) { mimetype = desc->mime_types[0]; - } else if (st->codecpar->codec_id = AV_CODEC_ID_TEXT) + } else if (st->codecpar->codec_id == AV_CODEC_ID_TEXT) mimetype = "text/plain"; } if (!mimetype) {