codec: make lifetimes saner
This commit is contained in:
@ -138,7 +138,7 @@ impl DerefMut for Decoder {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn find(id: Id) -> Option<Codec<'static>> {
|
||||
pub fn find(id: Id) -> Option<Codec> {
|
||||
unsafe {
|
||||
let ptr = avcodec_find_decoder(id.into());
|
||||
|
||||
@ -151,7 +151,7 @@ pub fn find(id: Id) -> Option<Codec<'static>> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn find_by_name(name: &str) -> Option<Codec<'static>> {
|
||||
pub fn find_by_name(name: &str) -> Option<Codec> {
|
||||
unsafe {
|
||||
let ptr = avcodec_find_decoder_by_name(CString::new(name).unwrap().as_ptr());
|
||||
|
||||
|
Reference in New Issue
Block a user