Dear all, I got stuck trying to decode a file using the AudioFile / 
AudioConverter 
APIs even though the file plays perfectly fine in the Finder and for example 
VLC.
The same code has been working fine before for thousands of files encoded in
a large variety of formats and encodings, so I suspect that there's something 
wrong
with the file, but since VLC and the Finder can handle it just fine, I should 
be able
to make my code more robust... 

Anyway, I can read the file format (aac encoded m4af), the magic cookie, etc 
just fine,
the only slightly weird thing being that the maximum packet size is returned as 
'0'
and that Property_FormatList returns four formats, the first one being as 
expected
and the other three just containing zeroes.

Initialising the AudioConverter also works fine. The problem arises when I call 
AudioFileReadPacketData in the converter's callback: the converter requests one 
packet of data and when I pass this request to AudioFileReadPacketData, I get no
data back. It doesn't throw an error and doesn't set the packet count to 0, it 
simply
returns 0 in ioNumBytes and the packet description also gives me a zero packet.

When I dutifully return that to the converter, it throws a bunch of messages 
along the
lines of

AACDecoder.cpp:192:Deserialize:  Unmatched number of channel elements in payload
AACDecoder.cpp:220:DecodeFrame:  Error deserializing packet
ACMP4AACBaseDecoder.cpp:1337:ProduceOutputBufferList: (0x102acb440) Error 
decoding packet 0: err = -1, packet length: 0

and the AudioConverter fails with the error code 'nope'... Does anyone have an 
idea
of what's going on here or what else I could try? In case you're interested, 
the file
in question is available for download at:

https://www.dropbox.com/s/mra3oeisj7izz6g/test.mp4

Thanks a lot!

Martin



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to