GNOME Bugzilla – Bug 551064
Import of some files bought in the iTunes store fails
Last modified: 2008-11-19 15:02:27 UTC
Banshee fails to import some .m4a files bought in the iTunes store, because taglib# is unable to detect the mediatype ("File does not contain audio or video"). I tracked the problem down to the usage of hdlr boxes by Apple: Some of the files I bought in the iTunes Store contain a second hdlr box as child of a minf box. The type of this box is 'alis', which is not recognized as a valid type by taglib. Because taglib decides on the mediatype based on the handler of the childs of the stsd box, which is defined after the 2nd/invalid occurence of the hdlr, the media type is not detected properly. This seems to be Apples fault, as ISO 14496-12 states that hdlr boxes are only valid in mdia or meta boxes, but not in minf boxes. Further, valid types are 'vide', 'soun' or 'hint' only. Maybe one should think about modifying the way the media type is detected (I don't know if/how this is explained in the standard, but other parser like AtomicParsley have no problem processing such files). As a workaround, I created a patch that prevents the propagation of the handler if there is already a handler set and the new definition is neither of type video or audio. This allows Banshee to import the affected files again.
Created attachment 118136 [details] [review] Patch that fixes mediatype detection for some .m4a files.
A fix is included in taglib-sharp 2.0.3.0-4.