Commit c342e2ef authored by Felix Paul Kühne's avatar Felix Paul Kühne

src/image: correctly handle anamorphic content sizes (closes #13862)

This fixes a regression introduced in e3b809c1
parent 5d4c526f
......@@ -677,17 +677,16 @@ static encoder_t *CreateEncoder( vlc_object_t *p_this, video_format_t *fmt_in,
p_enc->fmt_in.video.i_visible_height = fmt_out->i_height;
}
}
else if( fmt_out->i_sar_num && fmt_out->i_sar_den &&
fmt_out->i_sar_num * fmt_in->i_sar_den !=
fmt_out->i_sar_den * fmt_in->i_sar_num )
{
p_enc->fmt_in.video.i_width =
fmt_in->i_sar_num * (int64_t)fmt_out->i_sar_den * fmt_in->i_width /
fmt_in->i_sar_den / fmt_out->i_sar_num;
p_enc->fmt_in.video.i_visible_width =
fmt_in->i_sar_num * (int64_t)fmt_out->i_sar_den *
fmt_in->i_visible_width / fmt_in->i_sar_den / fmt_out->i_sar_num;
}
} else if( fmt_out->i_sar_num && fmt_out->i_sar_den &&
fmt_out->i_sar_num * fmt_in->i_sar_den !=
fmt_out->i_sar_den * fmt_in->i_sar_num )
{
p_enc->fmt_in.video.i_width =
fmt_in->i_sar_num * (int64_t)fmt_out->i_sar_den * fmt_in->i_width /
fmt_in->i_sar_den / fmt_out->i_sar_num;
p_enc->fmt_in.video.i_visible_width =
fmt_in->i_sar_num * (int64_t)fmt_out->i_sar_den *
fmt_in->i_visible_width / fmt_in->i_sar_den / fmt_out->i_sar_num;
}
p_enc->fmt_in.video.i_frame_rate = 25;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment