fix: capture dimensions must be > 0
This commit is contained in:
parent
7b411c3510
commit
1760354654
2 changed files with 8 additions and 0 deletions
|
|
@ -401,6 +401,10 @@ impl CaptureData {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let (width, height) = formats.buffer_size;
|
let (width, height) = formats.buffer_size;
|
||||||
|
|
||||||
|
if width == 0 || height == 0 {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
// XXX
|
// XXX
|
||||||
if !formats
|
if !formats
|
||||||
.shm_formats
|
.shm_formats
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,10 @@ impl CaptureData {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let (width, height) = formats.buffer_size;
|
let (width, height) = formats.buffer_size;
|
||||||
|
|
||||||
|
if width == 0 || height == 0 {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
// XXX
|
// XXX
|
||||||
if !formats
|
if !formats
|
||||||
.shm_formats
|
.shm_formats
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue