mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 00:26:31 +00:00
base_transform: Reset unused vfuncs on consecutive configure calls
If a user ends up changing the configured mode later on previously registered vfuncs are not reset meaning the object is effectively stuck in mode `Both`.
This commit is contained in:
parent
160728965b
commit
beaa22fabb
1 changed files with 2 additions and 0 deletions
|
@ -874,10 +874,12 @@ pub unsafe trait BaseTransformClassSubclassExt: Sized + 'static {
|
|||
|
||||
match mode {
|
||||
BaseTransformMode::AlwaysInPlace => {
|
||||
klass.transform = None;
|
||||
klass.transform_ip = Some(base_transform_transform_ip::<T>);
|
||||
}
|
||||
BaseTransformMode::NeverInPlace => {
|
||||
klass.transform = Some(base_transform_transform::<T>);
|
||||
klass.transform_ip = None;
|
||||
}
|
||||
BaseTransformMode::Both => {
|
||||
klass.transform = Some(base_transform_transform::<T>);
|
||||
|
|
Loading…
Reference in a new issue