[FFmpeg-devel] [PATCH] v4l2: Old or cheap cams will _not_ accept parms query or modification. ioctl(VIDIOC_G_PARM) or ioctl(VIDIOC_S_PARM)
Lucas F. Ottaviano
lucks.ph at gmail.com
Mon Feb 13 18:57:07 CET 2012
From: "Lucas F. Ottaviano" <lucks.ph at gmail.com>
Signed-off-by: Lucas F. Ottaviano <lucks.ph at gmail.com>
---
libavdevice/v4l2.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 642df1d..e39565e 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -627,10 +627,9 @@ static int v4l2_set_parameters(AVFormatContext *s1)
tpf->denominator = framerate_q.num;
if (v4l2_ioctl(s->fd, VIDIOC_S_PARM, &streamparm) != 0) {
- av_log(s1, AV_LOG_ERROR,
+ av_log(s1, AV_LOG_WARNING,
"ioctl set time per frame(%d/%d) failed\n",
framerate_q.den, framerate_q.num);
- return AVERROR(EIO);
}
if (framerate_q.num != tpf->denominator ||
@@ -643,9 +642,8 @@ static int v4l2_set_parameters(AVFormatContext *s1)
}
} else {
if (v4l2_ioctl(s->fd, VIDIOC_G_PARM, &streamparm) != 0) {
- av_log(s1, AV_LOG_ERROR, "ioctl(VIDIOC_G_PARM): %s\n",
+ av_log(s1, AV_LOG_WARNING, "ioctl(VIDIOC_G_PARM): %s\n",
strerror(errno));
- return AVERROR(errno);
}
}
s1->streams[0]->codec->time_base.den = tpf->denominator;
--
1.7.8.4
More information about the ffmpeg-devel
mailing list