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
+4
View File
@@ -134,12 +134,16 @@ class WavADMReader:
("audioStreamFormat[@audioStreamFormatID='%s']" ("audioStreamFormat[@audioStreamFormatID='%s']"
"/audioChannelFormatIDRef") % stream_id, "/audioChannelFormatIDRef") % stream_id,
namespaces=nsmap) namespaces=nsmap)
if channelformatref_elem:
channelformat_id = channelformatref_elem.text channelformat_id = channelformatref_elem.text
packformatref_elem = afext.find( packformatref_elem = afext.find(
("audioStreamFormat[@audioStreamFormatID='%s']" ("audioStreamFormat[@audioStreamFormatID='%s']"
"/audioPackFormatIDRef") % stream_id, "/audioPackFormatIDRef") % stream_id,
namespaces=nsmap) namespaces=nsmap)
if packformatref_elem:
packformat_id = packformatref_elem.text packformat_id = packformatref_elem.text
channelformat_elem = afext\ channelformat_elem = afext\