ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Thu Jul  4 23:34:59 
2024 -0300| [bef77c6c9c389e51d4b5619648af7e6bbf0d285c] | committer: James Almer

avformat/dump: only print yaw, pitch, and roll if set

Signed-off-by: James Almer <jamr...@gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bef77c6c9c389e51d4b5619648af7e6bbf0d285c
---

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

diff --git a/libavformat/dump.c b/libavformat/dump.c
index 7507434f92..ca497f68a5 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -390,10 +390,12 @@ static void dump_spherical(void *ctx, const 
AVCodecParameters *par,
 
     av_log(ctx, log_level, "%s ", 
av_spherical_projection_name(spherical->projection));
 
-    yaw = ((double)spherical->yaw) / (1 << 16);
-    pitch = ((double)spherical->pitch) / (1 << 16);
-    roll = ((double)spherical->roll) / (1 << 16);
-    av_log(ctx, log_level, "(%f/%f/%f) ", yaw, pitch, roll);
+    if (spherical->yaw || spherical->pitch || spherical->roll) {
+        yaw = ((double)spherical->yaw) / (1 << 16);
+        pitch = ((double)spherical->pitch) / (1 << 16);
+        roll = ((double)spherical->roll) / (1 << 16);
+        av_log(ctx, log_level, "(%f/%f/%f) ", yaw, pitch, roll);
+    }
 
     if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE) {
         size_t l, t, r, b;

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to