diff --git a/avconv.c b/avconv.c
index 0fac5c6c057ec1cb84abe83d25aded6b8d249641..b29f2006a71af17210706937cb1c5fa2bebd8d6d 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2104,7 +2104,7 @@ static int transcode_init(void)
             if (out_codec) {
                 encoder_name   = out_codec->name;
                 out_codec_name = avcodec_descriptor_get(out_codec->id)->name;
-                if (!strcmp(encoder_name, in_codec_name))
+                if (!strcmp(encoder_name, out_codec_name))
                     encoder_name = "native";
             }