Limit alloca to 1KB and use malloc for larger allocations
Work around ffmpeg generating incorrect LIBS in libavutil.pc