Browse Source

UI: Fix crash when saving advanced FFmpeg output

Selecting any supported FFmpeg format where ff_format_desc_extensions
returns NULL would crash the std::string constructor, so we pass an
empty extension instead (rtsp is one candidate format that triggers
the crash, on my machine at least)
Palana 10 years ago
parent
commit
cf69f24917
1 changed files with 1 additions and 1 deletions
  1. 1 1
      obs/window-basic-settings.cpp

+ 1 - 1
obs/window-basic-settings.cpp

@@ -2034,7 +2034,7 @@ void OBSBasicSettings::SaveFormat(QComboBox *combo)
 				desc.mimeType);
 
 		const char *ext = ff_format_desc_extensions(desc.desc);
-		string extStr = ext;
+		string extStr = ext ? ext : "";
 
 		char *comma = strchr(&extStr[0], ',');
 		if (comma)