Fix building previous versions

This commit is contained in:
AdrianEddy
2023-03-13 19:22:28 +01:00
parent c72dccb6ed
commit 8cfbf82e08
2 changed files with 15 additions and 3 deletions
+3 -1
View File
@@ -102,7 +102,9 @@ impl Context {
(*self.as_mut_ptr()).thread_type = config.kind.into();
(*self.as_mut_ptr()).thread_count = config.count as c_int;
#[cfg(not(feature = "ffmpeg_6_0"))]
{ (*self.as_mut_ptr()).thread_safe_callbacks = if config.safe { 1 } else { 0 }; }
{
(*self.as_mut_ptr()).thread_safe_callbacks = if config.safe { 1 } else { 0 };
}
}
}
+12 -2
View File
@@ -47,7 +47,12 @@ impl Filter {
if ptr.is_null() {
None
} else {
Some(PadIter::new((*self.as_ptr()).inputs, (*self.as_ptr()).nb_inputs as isize))
#[cfg(not(feature = "ffmpeg_6_0"))]
let nb_inputs = avfilter_pad_count((*self.as_ptr()).inputs) as isize;
#[cfg(feature = "ffmpeg_6_0")]
let nb_inputs = (*self.as_ptr()).nb_inputs as isize;
Some(PadIter::new((*self.as_ptr()).inputs, nb_inputs))
}
}
}
@@ -59,7 +64,12 @@ impl Filter {
if ptr.is_null() {
None
} else {
Some(PadIter::new((*self.as_ptr()).outputs, (*self.as_ptr()).nb_outputs as isize))
#[cfg(not(feature = "ffmpeg_6_0"))]
let nb_outputs = avfilter_pad_count((*self.as_ptr()).outputs) as isize;
#[cfg(feature = "ffmpeg_6_0")]
let nb_outputs = (*self.as_ptr()).nb_outputs as isize;
Some(PadIter::new((*self.as_ptr()).outputs, nb_outputs))
}
}
}