[ffmpeg] Rework build dependencies for cuda