mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-11-26 12:36:14 -05:00
use parking_lot::Once in ffmpeg
I'm getting deprecation warnings for std::sync::ONCE_INIT, and I'm not sure when std::sync::Once::new() became a const fn. Just as easy to switch to parking_lot.
This commit is contained in:
@@ -12,6 +12,7 @@ path = "lib.rs"
|
||||
[dependencies]
|
||||
libc = "0.2"
|
||||
log = { version = "0.4", features = ["release_max_level_info"] }
|
||||
parking_lot = { version = "0.9", features = [] }
|
||||
|
||||
[build-dependencies]
|
||||
cc = "1.0"
|
||||
|
||||
@@ -29,13 +29,13 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use log::info;
|
||||
use parking_lot::Once;
|
||||
use std::cell::{Ref, RefCell};
|
||||
use std::ffi::CStr;
|
||||
use std::fmt::{self, Write};
|
||||
use std::ptr;
|
||||
use std::sync;
|
||||
|
||||
static START: sync::Once = sync::ONCE_INIT;
|
||||
static START: Once = Once::new();
|
||||
|
||||
//#[link(name = "avcodec")]
|
||||
extern "C" {
|
||||
|
||||
Reference in New Issue
Block a user