Skip to content

Commit

Permalink
Fixed merge conflicts from #859
Browse files Browse the repository at this point in the history
  • Loading branch information
litetex committed Jun 19, 2022
1 parent 15eb167 commit aa58fe1
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,14 +381,16 @@ protected void generateAudioChannelConfigurationElement() {
"schemeIdUri",
"urn:mpeg:dash:23003:3:audio_channel_configuration:2011");

final Integer audioChannels = itagInfo.getAudioChannels();
Integer audioChannels = itagInfo.getAudioChannels();
if (audioChannels != null && audioChannels <= 0) {
throw new DashManifestCreationException(
"Invalid value for 'audioChannels'=" + audioChannels);
// Encountered invalid number of audio channels
// Most audio streams have 2 audio channels, so use this value as fallback
// see also https://github.com/TeamNewPipe/NewPipeExtractor/pull/859
audioChannels = 2;
}

appendNewAttrWithValue(
audioChannelConfigElement, "value", itagInfo.getAudioChannels());
audioChannelConfigElement, "value", audioChannels);

getFirstElementByName(REPRESENTATION).appendChild(audioChannelConfigElement);
} catch (final DOMException e) {
Expand Down

0 comments on commit aa58fe1

Please sign in to comment.