mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-28 22:33:00 +00:00
encoders/ffmpeg: Don't overwrite already correct settings
This commit is contained in:
parent
1485e7a724
commit
e754a1edd0
1 changed files with 4 additions and 3 deletions
|
@ -586,10 +586,11 @@ bool ffmpeg_instance::get_sei_data(uint8_t** data, size_t* size)
|
||||||
|
|
||||||
void ffmpeg_instance::get_video_info(struct video_scale_info* info)
|
void ffmpeg_instance::get_video_info(struct video_scale_info* info)
|
||||||
{
|
{
|
||||||
info->width = _scaler.get_source_width();
|
if (!is_hardware_encode()) {
|
||||||
info->height = _scaler.get_source_height();
|
// Override input with supported format if software encode.
|
||||||
info->format = ::ffmpeg::tools::avpixelformat_to_obs_videoformat(_scaler.get_source_format());
|
info->format = ::ffmpeg::tools::avpixelformat_to_obs_videoformat(_scaler.get_source_format());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int ffmpeg_instance::receive_packet(bool* received_packet, struct encoder_packet* packet)
|
int ffmpeg_instance::receive_packet(bool* received_packet, struct encoder_packet* packet)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue