software/scaling/context: allocate the output if it's empty
This commit is contained in:
parent
c7ec5a8117
commit
2439e67fd0
@ -101,6 +101,12 @@ impl Context {
|
||||
return Err(Error::InputChanged);
|
||||
}
|
||||
|
||||
unsafe {
|
||||
if output.is_empty() {
|
||||
output.alloc(self.output.format, self.output.width, self.output.height);
|
||||
}
|
||||
}
|
||||
|
||||
if output.format() != self.output.format || output.width() != self.output.width || output.height() != self.output.height {
|
||||
return Err(Error::OutputChanged);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user