libavdevice/v4l2.c:526: error: Uninitialized Value
  The value read from fps.den was never initialized.

libavdevice/v4l2.c:526:9: 
524.         av_log(s1, AV_LOG_DEBUG, "Setting time per frame to %d/%d\n",
525.                fps.den, fps.num);
526.         tpf->numerator   = fps.den;
             ^
527.         tpf->denominator = fps.num;
528.         if (ioctl(s->fd, VIDIOC_S_PARM, &streamparm) != 0) {

static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap)
{
    struct video_data *s = s1->priv_data;
    struct v4l2_input input;
    struct v4l2_standard standard;
    struct v4l2_streamparm streamparm = { 0 };
    struct v4l2_fract *tpf = &streamparm.parm.capture.timeperframe;
    int i, ret;
    AVRational fps;
    streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    if (s->framerate && (ret = av_parse_video_rate(&fps, s->framerate)) < 0) {
        av_log(s1, AV_LOG_ERROR, "Couldn't parse framerate.\n");
        return ret;
    }
#if FF_API_FORMAT_PARAMETERS
    if (ap->channel > 0)
        s->channel = ap->channel;
    if (ap->time_base.num)
        fps = (AVRational){ap->time_base.den, ap->time_base.num};
#endif
    memset (&input, 0, sizeof (input));
    input.index = s->channel;
    if (ioctl(s->fd, VIDIOC_ENUMINPUT, &input) < 0) {
        av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl enum input failed:\n");
        return AVERROR(EIO);
    }
    av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set input_id: %d, input: %s\n",
            s->channel, input.name);
    if (ioctl(s->fd, VIDIOC_S_INPUT, &input.index) < 0) {
        av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set input(%d) failed\n",
                s->channel);
        return AVERROR(EIO);
    }
#if FF_API_FORMAT_PARAMETERS
    if (ap->standard) {
        av_freep(&s->standard);
        s->standard = av_strdup(ap->standard);
    }
#endif
    if (s->standard) {
        av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s\n",
               s->standard);
        memset (&standard, 0, sizeof (standard));
        for(i=0;;i++) {
            standard.index = i;
            if (ioctl(s->fd, VIDIOC_ENUMSTD, &standard) < 0) {
                av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\n",
                       s->standard);
                return AVERROR(EIO);
            }
            if (!strcasecmp(standard.name, s->standard)) {
                break;
            }
        }
        av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s, id: %"PRIu64"\n",
               s->standard, (uint64_t)standard.id);
        if (ioctl(s->fd, VIDIOC_S_STD, &standard.id) < 0) {
            av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\n",
                   s->standard);
            return AVERROR(EIO);
        }
    }
    if (fps.num && fps.den) {
        av_log(s1, AV_LOG_DEBUG, "Setting time per frame to %d/%d\n",
               fps.den, fps.num);
        tpf->numerator   = fps.den;
        tpf->denominator = fps.num;
        if (ioctl(s->fd, VIDIOC_S_PARM, &streamparm) != 0) {
            av_log(s1, AV_LOG_ERROR,
                   "ioctl set time per frame(%d/%d) failed\n",
                   fps.den, fps.num);
            return AVERROR(EIO);
        }
        if (fps.num != tpf->denominator ||
            fps.den != tpf->numerator) {
            av_log(s1, AV_LOG_INFO,
                   "The driver changed the time per frame from %d/%d to %d/%d\n",
                   fps.den, fps.num,
                   tpf->numerator, tpf->denominator);
        }
    } else {
        if (ioctl(s->fd, VIDIOC_G_PARM, &streamparm) != 0) {
            av_log(s1, AV_LOG_ERROR, "ioctl(VIDIOC_G_PARM): %s\n", strerror(errno));
            return AVERROR(errno);
        }
    }
    return 0;
}
['static int v4l2_set_parameters(AVFormatContext *s1, AVFormatParameters *ap)\n{\n    struct video_data *s = s1->priv_data;\n    struct v4l2_input input;\n    struct v4l2_standard standard;\n    struct v4l2_streamparm streamparm = { 0 };\n    struct v4l2_fract *tpf = &streamparm.parm.capture.timeperframe;\n    int i, ret;\n    AVRational fps;\n    streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n    if (s->framerate && (ret = av_parse_video_rate(&fps, s->framerate)) < 0) {\n        av_log(s1, AV_LOG_ERROR, "Couldn\'t parse framerate.\\n");\n        return ret;\n    }\n#if FF_API_FORMAT_PARAMETERS\n    if (ap->channel > 0)\n        s->channel = ap->channel;\n    if (ap->time_base.num)\n        fps = (AVRational){ap->time_base.den, ap->time_base.num};\n#endif\n    memset (&input, 0, sizeof (input));\n    input.index = s->channel;\n    if (ioctl(s->fd, VIDIOC_ENUMINPUT, &input) < 0) {\n        av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl enum input failed:\\n");\n        return AVERROR(EIO);\n    }\n    av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set input_id: %d, input: %s\\n",\n            s->channel, input.name);\n    if (ioctl(s->fd, VIDIOC_S_INPUT, &input.index) < 0) {\n        av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set input(%d) failed\\n",\n                s->channel);\n        return AVERROR(EIO);\n    }\n#if FF_API_FORMAT_PARAMETERS\n    if (ap->standard) {\n        av_freep(&s->standard);\n        s->standard = av_strdup(ap->standard);\n    }\n#endif\n    if (s->standard) {\n        av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s\\n",\n               s->standard);\n        memset (&standard, 0, sizeof (standard));\n        for(i=0;;i++) {\n            standard.index = i;\n            if (ioctl(s->fd, VIDIOC_ENUMSTD, &standard) < 0) {\n                av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\\n",\n                       s->standard);\n                return AVERROR(EIO);\n            }\n            if (!strcasecmp(standard.name, s->standard)) {\n                break;\n            }\n        }\n        av_log(s1, AV_LOG_DEBUG, "The V4L2 driver set standard: %s, id: %"PRIu64"\\n",\n               s->standard, (uint64_t)standard.id);\n        if (ioctl(s->fd, VIDIOC_S_STD, &standard.id) < 0) {\n            av_log(s1, AV_LOG_ERROR, "The V4L2 driver ioctl set standard(%s) failed\\n",\n                   s->standard);\n            return AVERROR(EIO);\n        }\n    }\n    if (fps.num && fps.den) {\n        av_log(s1, AV_LOG_DEBUG, "Setting time per frame to %d/%d\\n",\n               fps.den, fps.num);\n        tpf->numerator   = fps.den;\n        tpf->denominator = fps.num;\n        if (ioctl(s->fd, VIDIOC_S_PARM, &streamparm) != 0) {\n            av_log(s1, AV_LOG_ERROR,\n                   "ioctl set time per frame(%d/%d) failed\\n",\n                   fps.den, fps.num);\n            return AVERROR(EIO);\n        }\n        if (fps.num != tpf->denominator ||\n            fps.den != tpf->numerator) {\n            av_log(s1, AV_LOG_INFO,\n                   "The driver changed the time per frame from %d/%d to %d/%d\\n",\n                   fps.den, fps.num,\n                   tpf->numerator, tpf->denominator);\n        }\n    } else {\n        if (ioctl(s->fd, VIDIOC_G_PARM, &streamparm) != 0) {\n            av_log(s1, AV_LOG_ERROR, "ioctl(VIDIOC_G_PARM): %s\\n", strerror(errno));\n            return AVERROR(errno);\n        }\n    }\n    return 0;\n}']