UI: Return false if audio encoder creation fails

This commit is contained in:
jp9000 committed 2017-08-01 02:27:35 -07:00
1 parent d98bda8fee
commit c5b26fe75c
1 file changed
+6
+6
View File
@@ -689,6 +689,9 @@ bool SimpleOutput::StartStreaming(obs_service_t *service)
const char *codec =
obs_output_get_supported_audio_codecs(streamOutput);
if (!codec) {
return false;
}
if (strcmp(codec, "aac") != 0) {
const char *id = FindAudioEncoderFromCodec(codec);
@@ -1381,6 +1384,9 @@ bool AdvancedOutput::StartStreaming(obs_service_t *service)
const char *codec =
obs_output_get_supported_audio_codecs(streamOutput);
if (!codec) {
return false;
}
if (strcmp(codec, "aac") == 0) {
streamAudioEnc = aacTrack[trackIndex - 1];