omg, major typo (fails if card supports rgb24)
authorAlex Beregszaszi <alex@rtfs.hu>
Thu, 18 Jan 2007 15:42:25 +0000 (15:42 +0000)
committerAlex Beregszaszi <alex@rtfs.hu>
Thu, 18 Jan 2007 15:42:25 +0000 (15:42 +0000)
Originally committed as revision 7580 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/grab.c

index 99cbe2f..4f37b87 100644 (file)
@@ -174,12 +174,13 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
                 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;
+                }
             }
         }
     }