encoders/generic: Set the time base correctly

There is a small but important difference in the way OBS Studio and FFmpeg handle the FPS time base. This change fixes the problem and makes all encoders go back to sanity.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-07-21 13:07:30 +02:00
parent 2472668f1d
commit 6851f2321a
+2 -2
View File
@@ -454,8 +454,8 @@ encoder::generic::generic(obs_data_t* settings, obs_encoder_t* encoder)
}
// Framerate
this->context->time_base.num = voi->fps_num;
this->context->time_base.den = voi->fps_den;
this->context->time_base.num = voi->fps_den;
this->context->time_base.den = voi->fps_num;
this->context->ticks_per_frame = 1;
} else if (this->codec->type == AVMEDIA_TYPE_AUDIO) {
}