format/context: implement DerefMut

This commit is contained in:
meh 2015-05-28 20:16:17 +02:00
parent 547ea2829e
commit 82ab89d1bf

View File

@ -2,7 +2,7 @@ use std::ffi::CString;
use std::ptr;
use std::path::Path;
use std::marker::PhantomData;
use std::ops::Deref;
use std::ops::{Deref, DerefMut};
use libc::c_uint;
use ffi::*;
@ -183,6 +183,12 @@ impl<'a> Deref for Packet<'a> {
}
}
impl<'a> DerefMut for Packet<'a> {
fn deref_mut<'b>(&'b mut self) -> &'b mut ::Packet {
&mut self.pkt
}
}
pub struct StreamIter<'a> {
ptr: *const AVFormatContext,
cur: c_uint,