On 30/12/11 20:03, Derek Buitenhuis wrote:
On 30/12/2011 2:02 PM, Måns Rullgård wrote:
It would remove the repeated fmt.fmt.pix, which is what I assumed Derek
was finding unsightly.

Yup.

Looks nicer?

     struct v4l2_format fmt;
+    struct v4l2_pix_format *pix = &fmt.fmt.pix;
+
     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;
+    pix->width = *width;
+    pix->height = *height;
+    pix->pixelformat = pix_fmt;
+    pix->field = V4L2_FIELD_ANY;
+

lu

--

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

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

Reply via email to