changeset 1669:30b51285b882 libavformat

omg, major typo (fails if card supports rgb24)
author alex
date Thu, 18 Jan 2007 15:42:25 +0000
parents b609473bf4bb
children 92afee454599
files grab.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/grab.c	Wed Jan 17 12:06:31 2007 +0000
+++ b/grab.c	Thu Jan 18 15:42:25 2007 +0000
@@ -174,12 +174,13 @@
                 pict.palette=VIDEO_PALETTE_RGB24;
                 pict.depth=24;
                 ret = ioctl(video_fd, VIDIOCSPICT, &pict);
-                if (ret < 0)
+                if (ret < 0) {
                     pict.palette=VIDEO_PALETTE_GREY;
                     pict.depth=8;
                     ret = ioctl(video_fd, VIDIOCSPICT, &pict);
                     if (ret < 0)
                         goto fail1;
+                }
             }
         }
     }