[FFmpeg-devel] [PATCH 2/3] avformat/dump: use av_spherical_projection_name() to print spherical projection names
James Almer
jamrial at gmail.com
Wed Mar 29 05:55:56 EEST 2017
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/dump.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/libavformat/dump.c b/libavformat/dump.c
index 3e6218303d..cb0468559e 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -353,21 +353,18 @@ 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");
+ av_log(ctx, AV_LOG_INFO, "%s", av_spherical_projection_name(spherical->projection));
+
+ if (spherical->projection != AV_SPHERICAL_EQUIRECTANGULAR &&
+ spherical->projection != AV_SPHERICAL_EQUIRECTANGULAR_TILE &&
+ spherical->projection != AV_SPHERICAL_CUBEMAP) {
return;
}
yaw = ((double)spherical->yaw) / (1 << 16);
pitch = ((double)spherical->pitch) / (1 << 16);
roll = ((double)spherical->roll) / (1 << 16);
- av_log(ctx, AV_LOG_INFO, "(%f/%f/%f) ", yaw, pitch, roll);
+ av_log(ctx, AV_LOG_INFO, " (%f/%f/%f) ", yaw, pitch, roll);
if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE) {
size_t l, t, r, b;
--
2.12.1
More information about the ffmpeg-devel
mailing list