[FFmpeg-cvslog] avformat/matroskaenc: Use comparison instead of assignment

Andreas Rheinhardt git at videolan.org
Wed Apr 22 04:51:50 EEST 2020


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Wed Apr 22 03:42:00 2020 +0200| [904b25a550cbdcffc22b6d6744da232dc1d6c54f] | committer: Andreas Rheinhardt

avformat/matroskaenc: Use comparison instead of assignment

This bug was introduced in 3589b3f2e217e78d16a92b372d95ce4a3f7df896.
Fixes Coverity ID 1462425.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=904b25a550cbdcffc22b6d6744da232dc1d6c54f
---

 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) {



More information about the ffmpeg-cvslog mailing list