[cheese] camera-device: limit width and height



commit 4d3b1a02402effef91beb29788e706a4a3ea4b99
Author: Wim Taymans <wtaymans redhat com>
Date:   Tue Apr 4 15:35:01 2017 +0200

    camera-device: limit width and height
    
    Set a limit on the width and height or else we might end scanning and
    overflowing forever.

 libcheese/cheese-camera-device.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/libcheese/cheese-camera-device.c b/libcheese/cheese-camera-device.c
index 0a8f514..e994c5f 100644
--- a/libcheese/cheese-camera-device.c
+++ b/libcheese/cheese-camera-device.c
@@ -472,6 +472,11 @@ cheese_camera_device_update_format_table (CheeseCameraDevice *device)
       if (min_height < 120)
         min_height = 120;
 
+      if (max_width > 5120)
+        max_width = 5120;
+      if (max_height > 3840)
+        max_height = 3840;
+
       cur_width  = min_width;
       cur_height = min_height;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]