libavdevice/v4l2.c:524: error: Uninitialized Value
  The value read from framerate_q.num was never initialized.

libavdevice/v4l2.c:524:9: 
522. 
523.     if (framerate_q.num && framerate_q.den) {
524.         av_log(s1, AV_LOG_DEBUG, "Setting time per frame to %d/%d\n",
             ^
525.                framerate_q.den, framerate_q.num);
526.         tpf->numerator   = framerate_q.den;

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 framerate_q;
    streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
    if (s->framerate && (ret = av_parse_video_rate(&framerate_q, 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)
        framerate_q = (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 (framerate_q.num && framerate_q.den) {
        av_log(s1, AV_LOG_DEBUG, "Setting time per frame to %d/%d\n",
               framerate_q.den, framerate_q.num);
        tpf->numerator   = framerate_q.den;
        tpf->denominator = framerate_q.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",
                   framerate_q.den, framerate_q.num);
            return AVERROR(EIO);
        }
        if (framerate_q.num != tpf->denominator ||
            framerate_q.den != tpf->numerator) {
            av_log(s1, AV_LOG_INFO,
                   "The driver changed the time per frame from %d/%d to %d/%d\n",
                   framerate_q.den, framerate_q.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);
        }
    }
    s1->streams[0]->codec->time_base.den = tpf->denominator;
    s1->streams[0]->codec->time_base.num = tpf->numerator;
    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 framerate_q;\n    streamparm.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;\n    if (s->framerate && (ret = av_parse_video_rate(&framerate_q, 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        framerate_q = (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 (framerate_q.num && framerate_q.den) {\n        av_log(s1, AV_LOG_DEBUG, "Setting time per frame to %d/%d\\n",\n               framerate_q.den, framerate_q.num);\n        tpf->numerator   = framerate_q.den;\n        tpf->denominator = framerate_q.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                   framerate_q.den, framerate_q.num);\n            return AVERROR(EIO);\n        }\n        if (framerate_q.num != tpf->denominator ||\n            framerate_q.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                   framerate_q.den, framerate_q.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    s1->streams[0]->codec->time_base.den = tpf->denominator;\n    s1->streams[0]->codec->time_base.num = tpf->numerator;\n    return 0;\n}']