summaryrefslogtreecommitdiff
path: root/libavformat/grab.c
diff options
context:
space:
mode:
authorRamiro Polla <ramiro@lisha.ufsc.br>2007-02-14 17:01:32 +0000
committerGuillaume Poirier <gpoirier@mplayerhq.hu>2007-02-14 17:01:32 +0000
commitcc58300e30e7aea6acfecd72a04a3886b285cfd8 (patch)
treee1060df29a65226dcdf1378538c920a1a544e2f8 /libavformat/grab.c
parent20121213630a03001148f3ffdadac895dae8d7c5 (diff)
implement new grabbing interface, as described here:
ttp://thread.gmane.org/gmane.comp.video.ffmpeg.devel/42920 patch by Ramiro Polla % ramiro A lisha P ufsc P br % Original thread: Date: Jan 31, 2007 8:56 PM Subject: [Ffmpeg-devel] [PATCH] New grabbing interface Originally committed as revision 7983 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/grab.c')
-rw-r--r--libavformat/grab.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavformat/grab.c b/libavformat/grab.c
index 11acdac3b1..5e778ecc06 100644
--- a/libavformat/grab.c
+++ b/libavformat/grab.c
@@ -68,7 +68,6 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
struct video_tuner tuner;
struct video_audio audio;
struct video_picture pict;
- const char *video_device;
int j;
if (ap->width <= 0 || ap->height <= 0 || ap->time_base.den <= 0) {
@@ -100,12 +99,9 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
s->frame_rate = frame_rate;
s->frame_rate_base = frame_rate_base;
- video_device = ap->device;
- if (!video_device)
- video_device = "/dev/video";
- video_fd = open(video_device, O_RDWR);
+ video_fd = open(s1->filename, O_RDWR);
if (video_fd < 0) {
- perror(video_device);
+ perror(s1->filename);
goto fail;
}