[FFmpeg-cvslog] lavd/v4l2: init return value.

Nicolas George git at videolan.org
Wed Jan 16 12:24:41 CET 2013


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Wed Jan 16 12:00:06 2013 +0100| [0e79fe37e5c5500db2e65ce6b7ea0bbdb3f24665] | committer: Nicolas George

lavd/v4l2: init return value.

Fix a warning and random failures.

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

 libavdevice/v4l2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 41ae3e8..4ac6967 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -221,7 +221,7 @@ static int device_init(AVFormatContext *ctx, int *width, int *height,
     struct v4l2_format fmt = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE };
     struct v4l2_pix_format *pix = &fmt.fmt.pix;
 
-    int res;
+    int res = 0;
 
     pix->width = *width;
     pix->height = *height;



More information about the ffmpeg-cvslog mailing list