avfilter/vf_v360: fix setting default height for stereographic

pull/322/head
Paul B Mahol 5 years ago
parent 801fd6e410
commit 24d4eea921
  1. 6
      libavfilter/vf_v360.c

@ -2240,7 +2240,7 @@ static int config_output(AVFilterLink *outlink)
in_transform = xyz_to_stereographic; in_transform = xyz_to_stereographic;
err = 0; err = 0;
wf = inlink->w; wf = inlink->w;
hf = inlink->h; hf = inlink->h / 2.f;
break; break;
default: default:
av_log(ctx, AV_LOG_ERROR, "Specified input format is not handled.\n"); av_log(ctx, AV_LOG_ERROR, "Specified input format is not handled.\n");
@ -2300,8 +2300,8 @@ static int config_output(AVFilterLink *outlink)
case STEREOGRAPHIC: case STEREOGRAPHIC:
out_transform = stereographic_to_xyz; out_transform = stereographic_to_xyz;
err = prepare_stereographic_out(ctx); err = prepare_stereographic_out(ctx);
w = FFMAX(roundf(wf), roundf(hf)); w = roundf(wf);
h = w; h = roundf(hf * 2.f);
break; break;
default: default:
av_log(ctx, AV_LOG_ERROR, "Specified output format is not handled.\n"); av_log(ctx, AV_LOG_ERROR, "Specified output format is not handled.\n");

Loading…
Cancel
Save