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