Commit 936c353f authored by Jan Gerber's avatar Jan Gerber
Browse files

if only width or height are given, set the other automaticaly to keep aspect ratio

parent cc5f9bc1
......@@ -344,6 +344,12 @@ void ff2theora_output(ff2theora this) {
}
this->fps = fps;
if(this->picture_width && !this->picture_height) {
this->picture_height = this->picture_width / ((double)venc->width/venc->height);
}
if(this->picture_height && !this->picture_width) {
this->picture_width = this->picture_height * ((double)venc->width/venc->height);
}
if(this->preset == V2V_PRESET_PREVIEW){
if(abs(this->fps-30)<1 && (venc->width!=NTSC_HALF_WIDTH || venc->height!=NTSC_HALF_HEIGHT) ){
......
Supports Markdown
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