Fix PadIter in FFmpeg pre-5.0 (#17)
This commit is contained in:
parent
f269020af8
commit
9eab7820bb
@ -48,19 +48,11 @@ impl Filter {
|
|||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
#[cfg(feature = "ffmpeg_5_0")]
|
#[cfg(feature = "ffmpeg_5_0")]
|
||||||
{
|
let count = (*self.as_ptr()).nb_inputs as isize;
|
||||||
Some(PadIter::new(
|
|
||||||
(*self.as_ptr()).inputs,
|
|
||||||
(*self.as_ptr()).nb_inputs as isize,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
#[cfg(not(feature = "ffmpeg_5_0"))]
|
#[cfg(not(feature = "ffmpeg_5_0"))]
|
||||||
{
|
let count = avfilter_pad_count(ptr) as isize;
|
||||||
Some(PadIter::new(
|
|
||||||
(*self.as_ptr()).inputs,
|
Some(PadIter::new(ptr, count))
|
||||||
(*self.as_ptr()).inputs as isize,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73,19 +65,11 @@ impl Filter {
|
|||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
#[cfg(feature = "ffmpeg_5_0")]
|
#[cfg(feature = "ffmpeg_5_0")]
|
||||||
{
|
let count = (*self.as_ptr()).nb_outputs as isize;
|
||||||
Some(PadIter::new(
|
|
||||||
(*self.as_ptr()).outputs,
|
|
||||||
(*self.as_ptr()).nb_outputs as isize,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
#[cfg(not(feature = "ffmpeg_5_0"))]
|
#[cfg(not(feature = "ffmpeg_5_0"))]
|
||||||
{
|
let count = avfilter_pad_count(ptr) as isize;
|
||||||
Some(PadIter::new(
|
|
||||||
(*self.as_ptr()).outputs,
|
Some(PadIter::new(ptr, count))
|
||||||
(*self.as_ptr()).outputs as isize,
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user