diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2008-12-27 11:40:07 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2008-12-27 11:40:07 +0000 |
commit | faf67322dc59954b01da29897df0b3f057e526eb (patch) | |
tree | 57ef1493f4f76d1d6fe8f56243d517a3aac2a71e /libavdevice/v4l.c | |
parent | cb82a0736d45a51793e4bd8c7b74cf11d1dc1b86 (diff) | |
download | ffmpeg-faf67322dc59954b01da29897df0b3f057e526eb.tar.gz |
Add missing check on the return value of the VIDIOCSWIN ioctl.
Originally committed as revision 16360 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavdevice/v4l.c')
-rw-r--r-- | libavdevice/v4l.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c index b350adb0cd..af9f0a4713 100644 --- a/libavdevice/v4l.c +++ b/libavdevice/v4l.c @@ -181,7 +181,10 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap) s->video_win.chromakey = -1; s->video_win.flags = 0; - ioctl(video_fd, VIDIOCSWIN, s->video_win); + if (ioctl(video_fd, VIDIOCSWIN, s->video_win) < 0) { + av_log(s1, AV_LOG_ERROR, "VIDIOCSWIN: %s\n", strerror(errno)); + goto fail; + } s->frame_format = pict.palette; |