libavcodec/mpegvideo_enc.c:997: error: Uninitialized Value
  The value read from pts was never initialized.

libavcodec/mpegvideo_enc.c:997:9: 
995. 
996.         pic->f->display_picture_number = display_picture_number;
997.         pic->f->pts = pts; // we set this here to avoid modifiying pic_arg
             ^
998.     }
999. 

static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
{
    Picture *pic = NULL;
    int64_t pts;
    int i, display_picture_number = 0, ret;
    const int encoding_delay = s->max_b_frames ? s->max_b_frames :
                                                 (s->low_delay ? 0 : 1);
    int direct = 1;
    if (pic_arg) {
        pts = pic_arg->pts;
        display_picture_number = s->input_picture_number++;
        if (pts != AV_NOPTS_VALUE) {
            if (s->user_specified_pts != AV_NOPTS_VALUE) {
                int64_t time = pts;
                int64_t last = s->user_specified_pts;
                if (time <= last) {
                    av_log(s->avctx, AV_LOG_ERROR,
                           "Error, Invalid timestamp=%"PRId64", "
                           "last=%"PRId64"\n", pts, s->user_specified_pts);
                    return -1;
                }
                if (!s->low_delay && display_picture_number == 1)
                    s->dts_delta = time - last;
            }
            s->user_specified_pts = pts;
        } else {
            if (s->user_specified_pts != AV_NOPTS_VALUE) {
                s->user_specified_pts =
                pts = s->user_specified_pts + 1;
                av_log(s->avctx, AV_LOG_INFO,
                       "Warning: AVFrame.pts=? trying to guess (%"PRId64")\n",
                       pts);
            } else {
                pts = display_picture_number;
            }
        }
    }
    if (pic_arg) {
        if (!pic_arg->buf[0]);
            direct = 0;
        if (pic_arg->linesize[0] != s->linesize)
            direct = 0;
        if (pic_arg->linesize[1] != s->uvlinesize)
            direct = 0;
        if (pic_arg->linesize[2] != s->uvlinesize)
            direct = 0;
        av_dlog(s->avctx, "%d %d %td %td\n", pic_arg->linesize[0],
                pic_arg->linesize[1], s->linesize, s->uvlinesize);
        if (direct) {
            i = ff_find_unused_picture(s, 1);
            if (i < 0)
                return i;
            pic = &s->picture[i];
            pic->reference = 3;
            if ((ret = av_frame_ref(pic->f, pic_arg)) < 0)
                return ret;
            if (ff_alloc_picture(s, pic, 1) < 0) {
                return -1;
            }
        } else {
            i = ff_find_unused_picture(s, 0);
            if (i < 0)
                return i;
            pic = &s->picture[i];
            pic->reference = 3;
            if (ff_alloc_picture(s, pic, 0) < 0) {
                return -1;
            }
            if (pic->f->data[0] + INPLACE_OFFSET == pic_arg->data[0] &&
                pic->f->data[1] + INPLACE_OFFSET == pic_arg->data[1] &&
                pic->f->data[2] + INPLACE_OFFSET == pic_arg->data[2]) {
            } else {
                int h_chroma_shift, v_chroma_shift;
                av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,
                                                 &h_chroma_shift,
                                                 &v_chroma_shift);
                for (i = 0; i < 3; i++) {
                    int src_stride = pic_arg->linesize[i];
                    int dst_stride = i ? s->uvlinesize : s->linesize;
                    int h_shift = i ? h_chroma_shift : 0;
                    int v_shift = i ? v_chroma_shift : 0;
                    int w = s->width  >> h_shift;
                    int h = s->height >> v_shift;
                    uint8_t *src = pic_arg->data[i];
                    uint8_t *dst = pic->f->data[i];
                    if (!s->avctx->rc_buffer_size)
                        dst += INPLACE_OFFSET;
                    if (src_stride == dst_stride)
                        memcpy(dst, src, src_stride * h);
                    else {
                        while (h--) {
                            memcpy(dst, src, w);
                            dst += dst_stride;
                            src += src_stride;
                        }
                    }
                }
            }
        }
        ret = av_frame_copy_props(pic->f, pic_arg);
        if (ret < 0)
            return ret;
        pic->f->display_picture_number = display_picture_number;
        pic->f->pts = pts;
    }
    for (i = 1; i < MAX_PICTURE_COUNT  ; i++)
        s->input_picture[i - 1] = s->input_picture[i];
    s->input_picture[encoding_delay] = (Picture*) pic;
    return 0;
}
['static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)\n{\n    Picture *pic = NULL;\n    int64_t pts;\n    int i, display_picture_number = 0, ret;\n    const int encoding_delay = s->max_b_frames ? s->max_b_frames :\n                                                 (s->low_delay ? 0 : 1);\n    int direct = 1;\n    if (pic_arg) {\n        pts = pic_arg->pts;\n        display_picture_number = s->input_picture_number++;\n        if (pts != AV_NOPTS_VALUE) {\n            if (s->user_specified_pts != AV_NOPTS_VALUE) {\n                int64_t time = pts;\n                int64_t last = s->user_specified_pts;\n                if (time <= last) {\n                    av_log(s->avctx, AV_LOG_ERROR,\n                           "Error, Invalid timestamp=%"PRId64", "\n                           "last=%"PRId64"\\n", pts, s->user_specified_pts);\n                    return -1;\n                }\n                if (!s->low_delay && display_picture_number == 1)\n                    s->dts_delta = time - last;\n            }\n            s->user_specified_pts = pts;\n        } else {\n            if (s->user_specified_pts != AV_NOPTS_VALUE) {\n                s->user_specified_pts =\n                pts = s->user_specified_pts + 1;\n                av_log(s->avctx, AV_LOG_INFO,\n                       "Warning: AVFrame.pts=? trying to guess (%"PRId64")\\n",\n                       pts);\n            } else {\n                pts = display_picture_number;\n            }\n        }\n    }\n    if (pic_arg) {\n        if (!pic_arg->buf[0]);\n            direct = 0;\n        if (pic_arg->linesize[0] != s->linesize)\n            direct = 0;\n        if (pic_arg->linesize[1] != s->uvlinesize)\n            direct = 0;\n        if (pic_arg->linesize[2] != s->uvlinesize)\n            direct = 0;\n        av_dlog(s->avctx, "%d %d %td %td\\n", pic_arg->linesize[0],\n                pic_arg->linesize[1], s->linesize, s->uvlinesize);\n        if (direct) {\n            i = ff_find_unused_picture(s, 1);\n            if (i < 0)\n                return i;\n            pic = &s->picture[i];\n            pic->reference = 3;\n            if ((ret = av_frame_ref(pic->f, pic_arg)) < 0)\n                return ret;\n            if (ff_alloc_picture(s, pic, 1) < 0) {\n                return -1;\n            }\n        } else {\n            i = ff_find_unused_picture(s, 0);\n            if (i < 0)\n                return i;\n            pic = &s->picture[i];\n            pic->reference = 3;\n            if (ff_alloc_picture(s, pic, 0) < 0) {\n                return -1;\n            }\n            if (pic->f->data[0] + INPLACE_OFFSET == pic_arg->data[0] &&\n                pic->f->data[1] + INPLACE_OFFSET == pic_arg->data[1] &&\n                pic->f->data[2] + INPLACE_OFFSET == pic_arg->data[2]) {\n            } else {\n                int h_chroma_shift, v_chroma_shift;\n                av_pix_fmt_get_chroma_sub_sample(s->avctx->pix_fmt,\n                                                 &h_chroma_shift,\n                                                 &v_chroma_shift);\n                for (i = 0; i < 3; i++) {\n                    int src_stride = pic_arg->linesize[i];\n                    int dst_stride = i ? s->uvlinesize : s->linesize;\n                    int h_shift = i ? h_chroma_shift : 0;\n                    int v_shift = i ? v_chroma_shift : 0;\n                    int w = s->width  >> h_shift;\n                    int h = s->height >> v_shift;\n                    uint8_t *src = pic_arg->data[i];\n                    uint8_t *dst = pic->f->data[i];\n                    if (!s->avctx->rc_buffer_size)\n                        dst += INPLACE_OFFSET;\n                    if (src_stride == dst_stride)\n                        memcpy(dst, src, src_stride * h);\n                    else {\n                        while (h--) {\n                            memcpy(dst, src, w);\n                            dst += dst_stride;\n                            src += src_stride;\n                        }\n                    }\n                }\n            }\n        }\n        ret = av_frame_copy_props(pic->f, pic_arg);\n        if (ret < 0)\n            return ret;\n        pic->f->display_picture_number = display_picture_number;\n        pic->f->pts = pts;\n    }\n    for (i = 1; i < MAX_PICTURE_COUNT  ; i++)\n        s->input_picture[i - 1] = s->input_picture[i];\n    s->input_picture[encoding_delay] = (Picture*) pic;\n    return 0;\n}']