[FFmpeg-cvslog] v4l2: remove pointless empty lines

Stefano Sabatini git at videolan.org
Sat May 28 21:24:03 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sat May 28 20:58:32 2011 +0200| [72c60f3ecdd8a9e1760c3929376de3f17ab9e74a] | committer: Stefano Sabatini

v4l2: remove pointless empty lines

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=72c60f3ecdd8a9e1760c3929376de3f17ab9e74a
---

 libavdevice/v4l2.c |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index deffa92..868328e 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -117,7 +117,6 @@ static int device_open(AVFormatContext *ctx, uint32_t *capabilities)
     if (fd < 0) {
         av_log(ctx, AV_LOG_ERROR, "Cannot open video device %s : %s\n",
                  ctx->filename, strerror(errno));
-
         return AVERROR(errno);
     }
 
@@ -133,13 +132,11 @@ static int device_open(AVFormatContext *ctx, uint32_t *capabilities)
         av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_QUERYCAP): %s\n",
                  strerror(errno));
         close(fd);
-
         return AVERROR(err);
     }
     if ((cap.capabilities & V4L2_CAP_VIDEO_CAPTURE) == 0) {
         av_log(ctx, AV_LOG_ERROR, "Not a video capture device\n");
         close(fd);
-
         return AVERROR(ENODEV);
     }
     *capabilities = cap.capabilities;
@@ -251,27 +248,23 @@ static int mmap_init(AVFormatContext *ctx)
         } else {
             av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_REQBUFS)\n");
         }
-
         return AVERROR(errno);
     }
 
     if (req.count < 2) {
         av_log(ctx, AV_LOG_ERROR, "Insufficient buffer memory\n");
-
         return AVERROR(ENOMEM);
     }
     s->buffers = req.count;
     s->buf_start = av_malloc(sizeof(void *) * s->buffers);
     if (s->buf_start == NULL) {
         av_log(ctx, AV_LOG_ERROR, "Cannot allocate buffer pointers\n");
-
         return AVERROR(ENOMEM);
     }
     s->buf_len = av_malloc(sizeof(unsigned int) * s->buffers);
     if (s->buf_len == NULL) {
         av_log(ctx, AV_LOG_ERROR, "Cannot allocate buffer sizes\n");
         av_free(s->buf_start);
-
         return AVERROR(ENOMEM);
     }
 
@@ -285,7 +278,6 @@ static int mmap_init(AVFormatContext *ctx)
         res = ioctl(s->fd, VIDIOC_QUERYBUF, &buf);
         if (res < 0) {
             av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_QUERYBUF)\n");
-
             return AVERROR(errno);
         }
 
@@ -299,7 +291,6 @@ static int mmap_init(AVFormatContext *ctx)
                         PROT_READ | PROT_WRITE, MAP_SHARED, s->fd, buf.m.offset);
         if (s->buf_start[i] == MAP_FAILED) {
             av_log(ctx, AV_LOG_ERROR, "mmap: %s\n", strerror(errno));
-
             return AVERROR(errno);
         }
     }
@@ -353,7 +344,6 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
     if (res < 0) {
         if (errno == EAGAIN) {
             pkt->size = 0;
-
             return AVERROR(EAGAIN);
         }
         av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_DQBUF): %s\n", strerror(errno));
@@ -363,7 +353,6 @@ static int mmap_read_frame(AVFormatContext *ctx, AVPacket *pkt)
     assert (buf.index < s->buffers);
     if (s->frame_size > 0 && buf.bytesused != s->frame_size) {
         av_log(ctx, AV_LOG_ERROR, "The v4l2 frame is %d bytes, but %d bytes are expected\n", buf.bytesused, s->frame_size);
-
         return AVERROR_INVALIDDATA;
     }
 
@@ -411,7 +400,6 @@ static int mmap_start(AVFormatContext *ctx)
         res = ioctl(s->fd, VIDIOC_QBUF, &buf);
         if (res < 0) {
             av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_QBUF): %s\n", strerror(errno));
-
             return AVERROR(errno);
         }
     }
@@ -420,7 +408,6 @@ static int mmap_start(AVFormatContext *ctx)
     res = ioctl(s->fd, VIDIOC_STREAMON, &type);
     if (res < 0) {
         av_log(ctx, AV_LOG_ERROR, "ioctl(VIDIOC_STREAMON): %s\n", strerror(errno));
-
         return AVERROR(errno);
     }
 
@@ -654,7 +641,6 @@ static int v4l2_read_header(AVFormatContext *s1, AVFormatParameters *ap)
     }
     if (res < 0) {
         close(s->fd);
-
         res = AVERROR(EIO);
         goto out;
     }



More information about the ffmpeg-cvslog mailing list