code: Remove audio encoder registration from FFmpeg Encoders

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2023-05-20 17:52:42 +02:00 committed by Xaymar
parent 9d0233a740
commit 3e13126f89

View file

@ -404,7 +404,6 @@ bool ffmpeg_instance::encode_video(uint32_t handle, int64_t pts, uint64_t lock_k
void ffmpeg_instance::initialize_sw(obs_data_t* settings)
{
if (_codec->type == AVMEDIA_TYPE_VIDEO) {
// Initialize Video Encoding
auto voi = video_output_get_info(obs_encoder_video(_self));
@ -445,7 +444,6 @@ void ffmpeg_instance::initialize_sw(obs_data_t* settings)
throw std::runtime_error(sstr.str());
}
}
}
void ffmpeg_instance::initialize_hw(obs_data_t*)
{
@ -1138,7 +1136,7 @@ ffmpeg_manager::ffmpeg_manager() : _factories()
if (!av_codec_is_encoder(codec))
continue;
if ((codec->type == AVMediaType::AVMEDIA_TYPE_AUDIO) || (codec->type == AVMediaType::AVMEDIA_TYPE_VIDEO)) {
if (codec->type == AVMediaType::AVMEDIA_TYPE_VIDEO) {
try {
_factories.emplace(codec, std::make_shared<ffmpeg_factory>(this, codec));
} catch (const std::exception& ex) {