Added tests to audioStreamFormat parsing

ASF's may have zero or one channelformatrefs or packformatrefs. We were
expecting one.
This commit is contained in:
2026-09-17 09:57:52 -07:00
parent 742c0b91fb
commit 13d9cd4914
+6 -2
View File
@@ -134,13 +134,17 @@ class WavADMReader:
("audioStreamFormat[@audioStreamFormatID='%s']"
"/audioChannelFormatIDRef") % stream_id,
namespaces=nsmap)
channelformat_id = channelformatref_elem.text
if channelformatref_elem:
channelformat_id = channelformatref_elem.text
packformatref_elem = afext.find(
("audioStreamFormat[@audioStreamFormatID='%s']"
"/audioPackFormatIDRef") % stream_id,
namespaces=nsmap)
packformat_id = packformatref_elem.text
if packformatref_elem:
packformat_id = packformatref_elem.text
channelformat_elem = afext\
.find("audioChannelFormat[@audioChannelFormatID='%s']"