add FF_API_AVCODEC_RESAMPLE and FFMPEG_VERSION_INT
fix PByteIOContext for ffmpeg-1.2. ffmpeg-0.8 works. ffmpeg-1.2 compiles but no audio and then crashes.