UI: Return false if audio encoder creation fails
This commit is contained in:
parent
d98bda8fee
commit
c5b26fe75c
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user