hrydgard/ppsspp — pull request #6394 by unknownbrackets (2014-06-22 17:00:00+00:00)
Title: Add AT3 support for background audio

Was getting an error about missing extradata, which led me to this:
https://www.ffmpeg.org/doxygen/trunk/structAVCodecContext.html
> some codecs need / can use extradata like Huffman tables.
> decoding: Set/allocated/freed by user.

So then I saw that the last 14 bytes of the fmt chunk were the extradata (from atrac.c looking at what it expected and etc.)

Still didn't work, because block_align was 0. Then I found this in the AVCodecContext docs:
> number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs.

So seems we need to set it too. Then it plays, yay.

-[Unknown]