mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
UI: Block signals while populating formats
Avoid unnecessarily triggering signals while populating the ffmpeg formats combo box.
This commit is contained in:
@@ -416,6 +416,8 @@ void OBSBasicSettings::LoadColorRanges()
|
||||
|
||||
void OBSBasicSettings::LoadFormats()
|
||||
{
|
||||
ui->advOutFFFormat->blockSignals(true);
|
||||
|
||||
formats.reset(ff_format_supported());
|
||||
const ff_format_desc *format = formats.get();
|
||||
|
||||
@@ -441,6 +443,8 @@ void OBSBasicSettings::LoadFormats()
|
||||
ui->advOutFFFormat->model()->sort(0);
|
||||
|
||||
ui->advOutFFFormat->insertItem(0, AV_FORMAT_DEFAULT_STR);
|
||||
|
||||
ui->advOutFFFormat->blockSignals(false);
|
||||
}
|
||||
|
||||
static void AddCodec(QComboBox *combo, const ff_codec_desc *codec_desc)
|
||||
|
||||
Reference in New Issue
Block a user