On 29/12/2011 11:29 AM, Luca Barbato wrote:
---
  libavdevice/v4l2.c |  129 +++++++++++++++++++++++++++++++++++----------------
  1 files changed, 88 insertions(+), 41 deletions(-)

[...]

      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: I still think fmt.fmt.pix.* is ugly, but I won't bikeshed it.

-    if (s->framerate&&  (ret = av_parse_video_rate(&framerate_q, 
s->framerate))<  0) {
-        av_log(s1, AV_LOG_ERROR, "Could not parse framerate '%s'.\n", 
s->framerate);
+    if (s->framerate&&
+        (ret = av_parse_video_rate(&framerate_q, s->framerate))<  0) {
+        av_log(s1, AV_LOG_ERROR, "Could not parse framerate '%s'.\n",
+               s->framerate);
          return ret;
      }

[...] (Continued below)

-    if (s->video_size&&  (res = av_parse_video_size(&s->width,&s->height, 
s->video_size))<  0) {
-        av_log(s1, AV_LOG_ERROR, "Could not parse video size '%s'.\n", 
s->video_size);
+    if (s->video_size&&
+        (res = av_parse_video_size(&s->width,&s->height, s->video_size))<  0) {
+        av_log(s1, AV_LOG_ERROR, "Could not parse video size '%s'.\n",
+               s->video_size);
          goto out;
      }
-    if (s->pixel_format&&  (pix_fmt = av_get_pix_fmt(s->pixel_format)) == 
PIX_FMT_NONE) {
-        av_log(s1, AV_LOG_ERROR, "No such pixel format: %s.\n", 
s->pixel_format);
+    if (s->pixel_format&&
+        (pix_fmt = av_get_pix_fmt(s->pixel_format)) == PIX_FMT_NONE) {
+        av_log(s1, AV_LOG_ERROR, "No such pixel format: %s.\n",
+               s->pixel_format);
          res = AVERROR(EINVAL);
          goto out;
      }


I personally think these end up much harder to read, but it's a matter
of personal taste of course.

Looks OK to me. Nothing but personal taste on my part here, and that
shouldn't hold it up, of course.

:)

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

Reply via email to