avformat/dump: use av_spherical_projection_name() to print spherical projection names
authorJames Almer <jamrial@gmail.com>
Wed, 29 Mar 2017 02:49:48 +0000 (23:49 -0300)
committerJames Almer <jamrial@gmail.com>
Fri, 31 Mar 2017 16:27:04 +0000 (13:27 -0300)
Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavformat/dump.c

index 7c811ce..ef4a6b0 100644 (file)
@@ -353,16 +353,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);