aboutsummaryrefslogtreecommitdiffstats
path: root/libav/grab.c
diff options
context:
space:
mode:
authorPhilip Gladstone <philipjsg@users.sourceforge.net>2002-05-09 01:18:42 +0000
committerPhilip Gladstone <philipjsg@users.sourceforge.net>2002-05-09 01:18:42 +0000
commit28c66901a94699421223797a929740061a4f1c64 (patch)
tree5325b99d6073d086c93e8db0c5c91c86e5446f2e /libav/grab.c
parent20f01548313c445bffb106672a46a074d8660992 (diff)
downloadffmpeg-28c66901a94699421223797a929740061a4f1c64.tar.gz
Intialize the codec type to video.
Originally committed as revision 463 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav/grab.c')
-rw-r--r--libav/grab.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libav/grab.c b/libav/grab.c
index 9c299daf83..389b241ff0 100644
--- a/libav/grab.c
+++ b/libav/grab.c
@@ -221,6 +221,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
s->fd = video_fd;
s->frame_size = frame_size;
+ st->codec.codec_type = CODEC_TYPE_VIDEO;
st->codec.codec_id = CODEC_ID_RAWVIDEO;
st->codec.width = width;
st->codec.height = height;
@@ -245,11 +246,11 @@ static int v4l_mm_read_picture(VideoData *s, UINT8 *buf)
/* Setup to capture the next frame */
gb_buf.frame = (gb_frame + 1) % gb_buffers.frames;
if (ioctl(s->fd, VIDIOCMCAPTURE, &gb_buf) < 0) {
- if (errno == EAGAIN)
- fprintf(stderr,"Cannot Sync\n");
- else
+ if (errno == EAGAIN)
+ fprintf(stderr,"Cannot Sync\n");
+ else
perror("VIDIOCMCAPTURE");
- return -EIO;
+ return -EIO;
}
gettimeofday(&tv_s, 0);