dump: use av_spherical_projection_name() to print spherical projection names
authorJames Almer <jamrial@gmail.com>
Tue, 4 Apr 2017 20:24:18 +0000 (17:24 -0300)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Thu, 27 Apr 2017 13:59:54 +0000 (09:59 -0400)
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/dump.c

index c568956..261e21e 100644 (file)
@@ -317,16 +317,7 @@ static void dump_spherical(void *ctx, AVCodecParameters *par, AVPacketSideData *
         return;
     }
 
-    if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR)
-        av_log(ctx, AV_LOG_INFO, "equirectangular ");
-    else if (spherical->projection == AV_SPHERICAL_CUBEMAP)
-        av_log(ctx, AV_LOG_INFO, "cubemap ");
-    else if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE)
-        av_log(ctx, AV_LOG_INFO, "tiled equirectangular ");
-    else {
-        av_log(ctx, AV_LOG_WARNING, "unknown");
-        return;
-    }
+    av_log(ctx, AV_LOG_INFO, "%s ", av_spherical_projection_name(spherical->projection));
 
     yaw = ((double)spherical->yaw) / (1 << 16);
     pitch = ((double)spherical->pitch) / (1 << 16);