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:
@@ -454,8 +454,8 @@ encoder::generic::generic(obs_data_t* settings, obs_encoder_t* encoder)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Framerate
|
// Framerate
|
||||||
this->context->time_base.num = voi->fps_num;
|
this->context->time_base.num = voi->fps_den;
|
||||||
this->context->time_base.den = voi->fps_den;
|
this->context->time_base.den = voi->fps_num;
|
||||||
this->context->ticks_per_frame = 1;
|
this->context->ticks_per_frame = 1;
|
||||||
} else if (this->codec->type == AVMEDIA_TYPE_AUDIO) {
|
} else if (this->codec->type == AVMEDIA_TYPE_AUDIO) {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user