diff v4l2.c @ 2274:b21c2af60bc9 libavformat

Replace all occurrences of AVERROR_IO with AVERROR(EIO).
author takis
date Thu, 19 Jul 2007 15:23:32 +0000
parents efb7b615d57c
children 0cc87456f0ad
line wrap: on
line diff
--- a/v4l2.c	Thu Jul 19 15:21:30 2007 +0000
+++ b/v4l2.c	Thu Jul 19 15:23:32 2007 +0000
@@ -443,7 +443,7 @@
         input.index = ap->channel;
         if(ioctl (s->fd, VIDIOC_ENUMINPUT, &input) < 0) {
             av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl enum input failed:\n");
-            return AVERROR_IO;
+            return AVERROR(EIO);
         }
 
         av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set input_id: %d, input: %s\n",
@@ -451,7 +451,7 @@
         if(ioctl (s->fd, VIDIOC_S_INPUT, &input.index) < 0 ) {
             av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set input(%d) failed\n",
                    ap->channel);
-            return AVERROR_IO;
+            return AVERROR(EIO);
         }
     }
 
@@ -465,7 +465,7 @@
             if (ioctl(s->fd, VIDIOC_ENUMSTD, &standard) < 0) {
                 av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\n",
                        ap->standard);
-                return AVERROR_IO;
+                return AVERROR(EIO);
             }
 
             if(!strcasecmp(standard.name, ap->standard)) {
@@ -478,7 +478,7 @@
         if (ioctl(s->fd, VIDIOC_S_STD, &standard.id) < 0) {
             av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\n",
                    ap->standard);
-            return AVERROR_IO;
+            return AVERROR(EIO);
         }
     }
 
@@ -526,7 +526,7 @@
     if (s->fd < 0) {
         av_free(st);
 
-        return AVERROR_IO;
+        return AVERROR(EIO);
     }
     av_log(s1, AV_LOG_INFO, "[%d]Capabilities: %x\n", s->fd, capabilities);
 
@@ -553,12 +553,12 @@
         close(s->fd);
         av_free(st);
 
-        return AVERROR_IO;
+        return AVERROR(EIO);
     }
     s->frame_format = desired_format;
 
     if( v4l2_set_parameters( s1, ap ) < 0 )
-        return AVERROR_IO;
+        return AVERROR(EIO);
 
     st->codec->pix_fmt = fmt_v4l2ff(desired_format);
     s->frame_size = avpicture_get_size(st->codec->pix_fmt, width, height);
@@ -576,7 +576,7 @@
         close(s->fd);
         av_free(st);
 
-        return AVERROR_IO;
+        return AVERROR(EIO);
     }
     s->top_field_first = first_field(s->fd);
 
@@ -601,14 +601,14 @@
         res = mmap_read_frame(s1, pkt);
     } else if (s->io_method == io_read) {
         if (av_new_packet(pkt, s->frame_size) < 0)
-            return AVERROR_IO;
+            return AVERROR(EIO);
 
         res = read_frame(s1, pkt);
     } else {
-        return AVERROR_IO;
+        return AVERROR(EIO);
     }
     if (res < 0) {
-        return AVERROR_IO;
+        return AVERROR(EIO);
     }
 
     if (s1->streams[0]->codec->coded_frame) {