format/context: some style fixes
This commit is contained in:
parent
e004eb9124
commit
ebdd8fb349
@ -12,8 +12,8 @@ use ::device;
|
||||
pub struct Context<'a> {
|
||||
pub ptr: *mut AVFormatContext,
|
||||
|
||||
input: bool,
|
||||
_marker: PhantomData<&'a i32>,
|
||||
_input: bool,
|
||||
_marker: PhantomData<&'a ()>,
|
||||
}
|
||||
|
||||
impl<'a> Context<'a> {
|
||||
@ -22,7 +22,7 @@ impl<'a> Context<'a> {
|
||||
Context {
|
||||
ptr: avformat_alloc_context(),
|
||||
|
||||
input: false,
|
||||
_input: false,
|
||||
_marker: PhantomData,
|
||||
}
|
||||
}
|
||||
@ -32,7 +32,7 @@ impl<'a> Context<'a> {
|
||||
Context {
|
||||
ptr: ptr,
|
||||
|
||||
input: true,
|
||||
_input: true,
|
||||
_marker: PhantomData,
|
||||
}
|
||||
}
|
||||
@ -135,7 +135,7 @@ impl<'a> Context<'a> {
|
||||
impl<'a> Drop for Context<'a> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
if self.input {
|
||||
if self._input {
|
||||
avformat_close_input(&mut self.ptr);
|
||||
}
|
||||
else {
|
||||
@ -224,7 +224,7 @@ pub struct DeviceIter<'a> {
|
||||
ptr: *mut AVDeviceInfoList,
|
||||
cur: c_int,
|
||||
|
||||
_marker: PhantomData<&'a i32>,
|
||||
_marker: PhantomData<&'a ()>,
|
||||
}
|
||||
|
||||
impl<'a> DeviceIter<'a> {
|
||||
@ -382,7 +382,7 @@ pub fn dump(ctx: &Context, index: i32, url: Option<&str>) {
|
||||
};
|
||||
|
||||
unsafe {
|
||||
if ctx.input {
|
||||
if ctx._input {
|
||||
av_dump_format(ctx.ptr, index, url, 0);
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user