[SCM] libav/experimental: Add missing check on the return value of the VIDIOCSWIN ioctl.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:34:21 UTC 2013


The following commit has been merged in the experimental branch:
commit faf67322dc59954b01da29897df0b3f057e526eb
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date:   Sat Dec 27 11:40:07 2008 +0000

    Add missing check on the return value of the VIDIOCSWIN ioctl.
    
    Originally committed as revision 16360 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c
index b350adb..af9f0a4 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;
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list