The #ifdef / #define block for CODEC_TYPE_AUDIO, which I suspect is intended to support old ffmeg versions appears to be the wrong way around, as evidenced by the fact that the rest of the code only uses AVMEDIA_TYPE_AUDIO. The enclosed patch fixes building with an "UNKNOWN" version of ffmpeg that I've built in 2010.
fix support for old ffmpeg versions
Thank you for the patch. However, we've deprecated the ffmpeg pseudo-format, and the handler will be removed from the next release. Therefore, it doesn't make much sense to apply the patch anymore.