Fixed linking order for ffmpeg libraries