Mercurial > libavformat.hg
diff grab.c @ 30:90fd30dd68b3 libavformat
grab device is in AVFormatParameter (at least better than global variable)
| author | bellard |
|---|---|
| date | Thu, 23 Jan 2003 10:33:16 +0000 |
| parents | fcdea3df94fe |
| children | a58a8a53eb46 |
line wrap: on
line diff
--- a/grab.c Thu Jan 23 09:55:19 2003 +0000 +++ b/grab.c Thu Jan 23 10:33:16 2003 +0000 @@ -62,6 +62,7 @@ int ret, frame_rate; int desired_palette; struct video_audio audio; + const char *video_device; if (!ap || ap->width <= 0 || ap->height <= 0 || ap->frame_rate <= 0) return -1; @@ -78,6 +79,9 @@ s->height = height; s->frame_rate = frame_rate; + video_device = ap->device; + if (!video_device) + video_device = "/dev/video"; video_fd = open(video_device, O_RDWR); if (video_fd < 0) { perror(video_device);
