aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/v4l.c
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2007-11-19 07:54:04 +0000
committerLuca Abeni <lucabe72@email.it>2007-11-19 07:54:04 +0000
commit9f74582cea3fd626737cd6785f8ae1da2491fab5 (patch)
treeccae6223d8b2d5ebafadddde6b70bbcaf8bf4aca /libavformat/v4l.c
parent7f0cd6a5293ff7608b3725f4dcc6ad141030cc4f (diff)
downloadffmpeg-9f74582cea3fd626737cd6785f8ae1da2491fab5.tar.gz
Do not use perror() in audio, video, and DV grabbers
Originally committed as revision 11058 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/v4l.c')
-rw-r--r--libavformat/v4l.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/v4l.c b/libavformat/v4l.c
index ac3cb0eda2..8005378559 100644
--- a/libavformat/v4l.c
+++ b/libavformat/v4l.c
@@ -119,12 +119,12 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
video_fd = open(s1->filename, O_RDWR);
if (video_fd < 0) {
- perror(s1->filename);
+ av_log(s1, AV_LOG_ERROR, "%s: %s\n", s1->filename, strerror(errno));
goto fail;
}
if (ioctl(video_fd,VIDIOCGCAP, &s->video_cap) < 0) {
- perror("VIDIOCGCAP");
+ av_log(s1, AV_LOG_ERROR, "VIDIOCGCAP: %s\n", strerror(errno));
goto fail;
}
@@ -221,7 +221,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
if ((unsigned char*)-1 == s->video_buf) {
s->video_buf = mmap(0,s->gb_buffers.size,PROT_READ|PROT_WRITE,MAP_PRIVATE,video_fd,0);
if ((unsigned char*)-1 == s->video_buf) {
- perror("mmap");
+ av_log(s1, AV_LOG_ERROR, "mmap: %s\n", strerror(errno));
goto fail;
}
}
@@ -298,7 +298,7 @@ static int v4l_mm_read_picture(VideoData *s, uint8_t *buf)
if (errno == EAGAIN)
av_log(NULL, AV_LOG_ERROR, "Cannot Sync\n");
else
- perror("VIDIOCMCAPTURE");
+ av_log(NULL, AV_LOG_ERROR, "VIDIOCMCAPTURE: %s\n", strerror(errno));
return AVERROR(EIO);
}