Fixed incorrect codec type in the output for profiles/levels in cmd stagefright

o related-to-bug: 6401068

Change-Id: Icdc2cfa37ed053f53d1466d8b068f1d9973ed82f
diff --git a/cmds/stagefright/stagefright.cpp b/cmds/stagefright/stagefright.cpp
index 7087a81..0362f39 100644
--- a/cmds/stagefright/stagefright.cpp
+++ b/cmds/stagefright/stagefright.cpp
@@ -621,11 +621,8 @@
         MEDIA_MIMETYPE_VIDEO_VPX
     };
 
-    if (queryDecoders) {
-        printf("decoder profiles:\n");
-    } else {
-        printf("encoder profiles:\n");
-    }
+    const char *codecType = queryDecoders? "decoder" : "encoder";
+    printf("%s profiles:\n", codecType);
 
     for (size_t k = 0; k < sizeof(kMimeTypes) / sizeof(kMimeTypes[0]); ++k) {
         printf("type '%s':\n", kMimeTypes[k]);
@@ -637,8 +634,8 @@
                              &results), (status_t)OK);
 
         for (size_t i = 0; i < results.size(); ++i) {
-            printf("  decoder '%s' supports ",
-                       results[i].mComponentName.string());
+            printf("  %s '%s' supports ",
+                       codecType, results[i].mComponentName.string());
 
             if (results[i].mProfileLevels.size() == 0) {
                     printf("NOTHING.\n");