Skip to content

Commit

Permalink
Fix aspect ratio for custom video mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Sep 7, 2014
1 parent d04dbc6 commit f6860f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dialogs/customprofiledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ void CustomProfileDialog::on_buttonBox_accepted()
MLT.profile().set_explicit(1);
MLT.profile().set_width(ui->widthSpinner->value());
MLT.profile().set_height(ui->heightSpinner->value());
int sar_num = ui->heightSpinner->value() * ui->aspectNumSpinner->value() / ui->aspectDenSpinner->value();
int sar_den = ui->widthSpinner->value();
MLT.profile().set_display_aspect(ui->aspectNumSpinner->value(), ui->aspectDenSpinner->value());
int sar_num = ui->heightSpinner->value() * ui->aspectNumSpinner->value() / ui->aspectDenSpinner->value();//1024
int sar_den = ui->widthSpinner->value(); //720
if (sar_num == sar_den)
sar_num = sar_den = 1;
MLT.profile().set_sample_aspect(sar_num, sar_den);
Expand Down

0 comments on commit f6860f3

Please sign in to comment.