Browse Source

UI: Block signals while populating formats

Avoid unnecessarily triggering signals while populating
the ffmpeg formats combo box.
kc5nra 10 years ago
parent
commit
a090ed5795
1 changed files with 4 additions and 0 deletions
  1. 4 0
      obs/window-basic-settings.cpp

+ 4 - 0
obs/window-basic-settings.cpp

@@ -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)