omg, major typo (fails if card supports rgb24)

Originally committed as revision 7580 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Alex Beregszaszi
2007-01-18 15:42:25 +00:00
parent e2158da8cc
commit 453cd7a496

View File

@@ -174,7 +174,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
pict.palette=VIDEO_PALETTE_RGB24; pict.palette=VIDEO_PALETTE_RGB24;
pict.depth=24; pict.depth=24;
ret = ioctl(video_fd, VIDIOCSPICT, &pict); ret = ioctl(video_fd, VIDIOCSPICT, &pict);
if (ret < 0) if (ret < 0) {
pict.palette=VIDEO_PALETTE_GREY; pict.palette=VIDEO_PALETTE_GREY;
pict.depth=8; pict.depth=8;
ret = ioctl(video_fd, VIDIOCSPICT, &pict); ret = ioctl(video_fd, VIDIOCSPICT, &pict);
@@ -183,6 +183,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
} }
} }
} }
}
ret = ioctl(video_fd,VIDIOCGMBUF,&s->gb_buffers); ret = ioctl(video_fd,VIDIOCGMBUF,&s->gb_buffers);
if (ret < 0) { if (ret < 0) {