diff --git a/src/codec/context.rs b/src/codec/context.rs index bbaae35..8d2e266 100644 --- a/src/codec/context.rs +++ b/src/codec/context.rs @@ -1,4 +1,4 @@ -use std::{ptr, rc::Rc}; +use std::{any::Any, ptr, rc::Rc}; use libc::c_int; @@ -9,13 +9,13 @@ use crate::{ffi::*, media, Codec, Error, Rational}; pub struct Context { ptr: *mut AVCodecContext, - owner: Option>, + owner: Option>, } unsafe impl Send for Context {} impl Context { - pub unsafe fn wrap(ptr: *mut AVCodecContext, owner: Option>) -> Self { + pub unsafe fn wrap(ptr: *mut AVCodecContext, owner: Option>) -> Self { Context { ptr, owner } } diff --git a/src/codec/parameters.rs b/src/codec/parameters.rs index aa59a8d..8c974d3 100644 --- a/src/codec/parameters.rs +++ b/src/codec/parameters.rs @@ -1,17 +1,17 @@ -use std::rc::Rc; +use std::{any::Any, ops::Deref, rc::Rc}; use super::{Context, Id}; use crate::{ffi::*, media}; pub struct Parameters { ptr: *mut AVCodecParameters, - owner: Option>, + owner: Option>, } unsafe impl Send for Parameters {} impl Parameters { - pub unsafe fn wrap(ptr: *mut AVCodecParameters, owner: Option>) -> Self { + pub unsafe fn wrap(ptr: *mut AVCodecParameters, owner: Option>) -> Self { Parameters { ptr, owner } }