diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2003-01-23 10:33:16 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2003-01-23 10:33:16 +0000 |
commit | 7f172339fdcdeb0393c1a296da95acb6fc57d3b8 (patch) | |
tree | ed930c7e3f091d4bd816974e8da19c548eab08f9 /libavformat/dv1394.c | |
parent | 79a7c2683e12398725dbf2fa8984ea371a6965ce (diff) | |
download | ffmpeg-7f172339fdcdeb0393c1a296da95acb6fc57d3b8.tar.gz |
grab device is in AVFormatParameter (at least better than global variable)
Originally committed as revision 1499 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/dv1394.c')
-rw-r--r-- | libavformat/dv1394.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/dv1394.c b/libavformat/dv1394.c index 8515160545..f0b5e8d5ee 100644 --- a/libavformat/dv1394.c +++ b/libavformat/dv1394.c @@ -76,6 +76,7 @@ static int dv1394_read_header(AVFormatContext * context, AVFormatParameters * ap { struct dv1394_data *dv = context->priv_data; AVStream *st; + const char *video_device; st = av_new_stream(context, 0); if (!st) @@ -83,14 +84,16 @@ static int dv1394_read_header(AVFormatContext * context, AVFormatParameters * ap dv->width = DV1394_WIDTH; dv->height = DV1394_HEIGHT; - dv->channel = dv1394_channel; + dv->channel = ap->channel; dv->frame_rate = 30; dv->frame_size = DV1394_NTSC_FRAME_SIZE; /* Open and initialize DV1394 device */ - + video_device = ap->device; + if (!video_device) + video_device = "/dev/dv1394/0"; dv->fd = open(video_device, O_RDONLY); if (dv->fd < 0) { perror("Failed to open DV interface"); |