Skip to content

Commit aa58fe1

Browse files
committed
Fixed merge conflicts from #859
1 parent 15eb167 commit aa58fe1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/dashmanifestcreator/AbstractYoutubeDashManifestCreator.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,14 +381,16 @@ protected void generateAudioChannelConfigurationElement() {
381381
"schemeIdUri",
382382
"urn:mpeg:dash:23003:3:audio_channel_configuration:2011");
383383

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

390392
appendNewAttrWithValue(
391-
audioChannelConfigElement, "value", itagInfo.getAudioChannels());
393+
audioChannelConfigElement, "value", audioChannels);
392394

393395
getFirstElementByName(REPRESENTATION).appendChild(audioChannelConfigElement);
394396
} catch (final DOMException e) {

0 commit comments

Comments
 (0)