On 27/12/2011 8:20 AM, Luca Barbato wrote:
---
  libavdevice/v4l2.c |  127 +++++++++++++++++++++++++++++++++++----------------
  1 files changed, 87 insertions(+), 40 deletions(-)

\o/

@@ -160,20 +167,28 @@ static int device_init(AVFormatContext *ctx, int *width, 
int *height, uint32_t p
      int res;

      memset(&fmt, 0, sizeof(struct v4l2_format));
+
      fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
      fmt.fmt.pix.width = *width;
      fmt.fmt.pix.height = *height;
      fmt.fmt.pix.pixelformat = pix_fmt;
      fmt.fmt.pix.field = V4L2_FIELD_ANY;

Nit: Man... this is ugly... can we set create a var instead of using
fmt.fmt.pic.*? I'd definitely file that under cosmetics. :P

@@ -328,9 +347,8 @@ static void mmap_release_buffer(AVPacket *pkt)
      int res, fd;
      struct buff_data *buf_descriptor = pkt->priv;

-    if (pkt->data == NULL) {
+    if (pkt->data == NULL)
           return;
-    }

The return statement is indented by one-too-many spaces.

The rest LGTM.

Reviewed-by: Derek Buitenhuis <[email protected]>

- Derek
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to