From e004eb91246d9d03afcac2dde0eaa98659e645ce Mon Sep 17 00:00:00 2001 From: meh Date: Tue, 12 May 2015 18:17:47 +0200 Subject: [PATCH] codec/context: some style fixes --- src/codec/context.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/codec/context.rs b/src/codec/context.rs index 6059c99..6b994b4 100644 --- a/src/codec/context.rs +++ b/src/codec/context.rs @@ -12,19 +12,19 @@ use ::frame; pub struct Context<'a> { pub ptr: *mut AVCodecContext, - own: bool, - _marker: PhantomData<&'a i32>, + _own: bool, + _marker: PhantomData<&'a ()>, } impl<'a> Context<'a> { pub fn new() -> Self { unsafe { - Context { ptr: avcodec_alloc_context3(ptr::null()), own: true, _marker: PhantomData } + Context { ptr: avcodec_alloc_context3(ptr::null()), _own: true, _marker: PhantomData } } } pub fn wrap(ptr: *mut AVCodecContext) -> Self { - Context { ptr: ptr, own: false, _marker: PhantomData } + Context { ptr: ptr, _own: false, _marker: PhantomData } } pub fn open(self, codec: &Codec) -> Result, Error> { @@ -60,7 +60,7 @@ impl<'a> Context<'a> { impl<'a> Drop for Context<'a> { fn drop(&mut self) { - if self.own { + if self._own { unsafe { avcodec_free_context(&mut self.ptr); }