avfilter/vf_showinfo: only print yaw, pitch, and roll if set

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2024-06-26 11:05:54 -03:00
parent 778096757d
commit beacdbf4b4
1 changed files with 6 additions and 4 deletions

View File

@ -80,10 +80,12 @@ static void dump_spherical(AVFilterContext *ctx, AVFrame *frame, const AVFrameSi
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);
roll = ((double)spherical->roll) / (1 << 16);
av_log(ctx, AV_LOG_INFO, "(%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, AV_LOG_INFO, "(%f/%f/%f) ", yaw, pitch, roll);
}
if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE) {
size_t l, t, r, b;