[FFmpeg-devel] avformat/dump: be more verbose when printing spherical metadata information

Submitted by James Almer on Dec. 15, 2016, 8:20 p.m.

Details

Message ID 20161215202033.3764-1-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer Dec. 15, 2016, 8:20 p.m.
Signed-off-by: James Almer <jamrial@gmail.com>
---
This prints

spherical: equirectangular, yaw=0.000000, pitch=0.000000, roll=0.000000

Instead of

spherical: equirectangular (0.000000/0.000000/0.000000)

 libavformat/dump.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Michael Niedermayer Dec. 16, 2016, 1:04 a.m.
On Thu, Dec 15, 2016 at 05:20:33PM -0300, James Almer wrote:
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
> This prints
> 
> spherical: equirectangular, yaw=0.000000, pitch=0.000000, roll=0.000000
> 
> Instead of
> 
> spherical: equirectangular (0.000000/0.000000/0.000000)
> 
>  libavformat/dump.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

should be ok i think

thx

[...]

Patch hide | download patch | download mbox

diff --git a/libavformat/dump.c b/libavformat/dump.c
index d9aa3af..73914a5 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -354,9 +354,9 @@  static void dump_spherical(void *ctx, AVPacketSideData *sd)
     }
 
     if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR)
-        av_log(ctx, AV_LOG_INFO, "equirectangular ");
+        av_log(ctx, AV_LOG_INFO, "equirectangular, ");
     else if (spherical->projection == AV_SPHERICAL_CUBEMAP)
-        av_log(ctx, AV_LOG_INFO, "cubemap ");
+        av_log(ctx, AV_LOG_INFO, "cubemap, ");
     else {
         av_log(ctx, AV_LOG_WARNING, "unknown");
         return;
@@ -365,7 +365,7 @@  static void dump_spherical(void *ctx, AVPacketSideData *sd)
     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, "yaw=%f, pitch=%f, roll=%f ", yaw, pitch, roll);
 }
 
 static void dump_sidedata(void *ctx, AVStream *st, const char *indent)