diff --git a/cinelerra-5.1/cinelerra/setformat.C b/cinelerra-5.1/cinelerra/setformat.C index 4d96a607..9de59765 100644 --- a/cinelerra-5.1/cinelerra/setformat.C +++ b/cinelerra-5.1/cinelerra/setformat.C @@ -45,6 +45,10 @@ #include "vwindow.h" #include "vwindowgui.h" +extern "C" +{ +#include +} SetFormat::SetFormat(MWindow *mwindow) @@ -454,6 +458,21 @@ void SetFormatWindow::create_objects() (ArrayList*)&mwindow->interlace_project_modes, mwindow->theme->setformat_x4 + textbox->get_w(), y)); y += mwindow->theme->setformat_margin; + + + char sar_string[BCTEXTLEN]; + float aspect_w = thread->new_settings->session->aspect_w; + float aspect_h = thread->new_settings->session->aspect_h; + int w = thread->dimension[0]; + int h = thread->dimension[1]; + int sar_num = (aspect_w/aspect_h)*w; + int sar_den = (aspect_w/aspect_h)*h; + int s_num = 0, s_den = 0; + int ret = av_reduce(&s_num, &s_den, sar_num, sar_den, 1000); + sprintf(sar_string, "SAR: %i:%i \n", s_num, s_den); + add_subwindow(new BC_Title(mwindow->theme->setformat_x3, + y, + (const char *)sar_string)); BC_OKTextButton *ok; BC_CancelTextButton *cancel;