video: Rename path to filename in OpenH264::new

This value does not have to be a path, it can be a filename of
a library that is automatically located on the system.
This commit is contained in:
Kamil Jarosz 2024-09-06 21:20:46 +02:00 committed by TÖRÖK Attila
parent d0ede26cce
commit 835d2eabaa
1 changed files with 2 additions and 2 deletions

View File

@ -1359,11 +1359,11 @@ pub struct OpenH264 {
Result<unsafe extern "C" fn(pVersion: *mut OpenH264Version), ::libloading::Error>,
}
impl OpenH264 {
pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
pub unsafe fn new<P>(filename: P) -> Result<Self, ::libloading::Error>
where
P: AsRef<::std::ffi::OsStr>,
{
let library = ::libloading::Library::new(path)?;
let library = ::libloading::Library::new(filename)?;
Self::from_library(library)
}
pub unsafe fn from_library<L>(library: L) -> Result<Self, ::libloading::Error>