enocder: Use ffmpeg for pixel format again

Reverts an earlier change as this apparently works now.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-10-17 08:16:42 +02:00
parent 2f8acc58cf
commit 58d8713369
3 changed files with 2 additions and 105 deletions
+1 -2
View File
@@ -600,8 +600,7 @@ void obsffmpeg::encoder::initialize_sw(obs_data_t* settings)
static_cast<AVPixelFormat>(obs_data_get_int(settings, ST_FFMPEG_COLORFORMAT));
if (_pixfmt_target == AV_PIX_FMT_NONE) {
// Find the best conversion format.
std::vector<AVPixelFormat> fmts = ffmpeg::tools::get_software_formats(_codec->pix_fmts);
_pixfmt_target = ffmpeg::tools::get_best_compatible_format(fmts.data(), _pixfmt_source);
_pixfmt_target = ffmpeg::tools::get_least_lossy_format(_codec->pix_fmts, _pixfmt_source);
if (_handler) // Allow Handler to override the automatic color format for sanity reasons.
_handler->override_colorformat(_pixfmt_target, settings, _codec, _context);