mirror of
https://github.com/iluvcapra/wavinfo.git
synced 2026-10-02 01:37:22 +00:00
Added tests to audioStreamFormat parsing
ASF's may have zero or one channelformatrefs or packformatrefs. We were expecting one.
This commit is contained in:
@@ -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\
|
||||||
|
|||||||
Reference in New Issue
Block a user