libavformat/mpeg.c:293: error: Uninitialized Value
  The value read from c was never initialized.

libavformat/mpeg.c:293:16: 
291.             len -= 5;
292.         }
293.     } else if ((c & 0xc0) == 0x80) {
                    ^
294.         /* mpeg 2 PES */
295.         flags = avio_r8(s->pb);

static int mpegps_read_pes_header(AVFormatContext *s,
                                  int64_t *ppos, int *pstart_code,
                                  int64_t *ppts, int64_t *pdts)
{
    MpegDemuxContext *m = s->priv_data;
    int len, size, startcode, c, flags, header_len;
    int pes_ext, ext2_len, id_ext, skip;
    int64_t pts, dts;
    int64_t last_sync= avio_tell(s->pb);
 error_redo:
        avio_seek(s->pb, last_sync, SEEK_SET);
 redo:
        m->header_state = 0xff;
        size = MAX_SYNC_SIZE;
        startcode = find_next_start_code(s->pb, &size, &m->header_state);
        last_sync = avio_tell(s->pb);
    if (startcode < 0){
        if(s->pb->eof_reached)
            return AVERROR_EOF;
        return AVERROR(EAGAIN);
    }
    if (startcode == PACK_START_CODE)
        goto redo;
    if (startcode == SYSTEM_HEADER_START_CODE)
        goto redo;
    if (startcode == PADDING_STREAM) {
        avio_skip(s->pb, avio_rb16(s->pb));
        goto redo;
    }
    if (startcode == PRIVATE_STREAM_2) {
        len = avio_rb16(s->pb);
        if (!m->sofdec) {
            while (len-- >= 6) {
                if (avio_r8(s->pb) == 'S') {
                    uint8_t buf[5];
                    avio_read(s->pb, buf, sizeof(buf));
                    m->sofdec = !memcmp(buf, "ofdec", 5);
                    len -= sizeof(buf);
                    break;
                }
            }
            m->sofdec -= !m->sofdec;
        }
        avio_skip(s->pb, len);
        goto redo;
    }
    if (startcode == PROGRAM_STREAM_MAP) {
        mpegps_psm_parse(m, s->pb);
        goto redo;
    }
    if (!((startcode >= 0x1c0 && startcode <= 0x1df) ||
          (startcode >= 0x1e0 && startcode <= 0x1ef) ||
          (startcode == 0x1bd) || (startcode == 0x1fd)))
        goto redo;
    if (ppos) {
        *ppos = avio_tell(s->pb) - 4;
    }
    len = avio_rb16(s->pb);
    pts =
    dts = AV_NOPTS_VALUE;
    for(;;) {
        if (len < 1)
            goto error_redo;
        c = avio_r8(s->pb);
        len--;
        if (c != 0xff)
            break;
    }
    if ((c & 0xc0) == 0x40) {
        avio_r8(s->pb);
        c = avio_r8(s->pb);
        len -= 2;
    }
    if ((c & 0xe0) == 0x20) {
        dts = pts = get_pts(s->pb, c);
        len -= 4;
        if (c & 0x10){
            dts = get_pts(s->pb, -1);
            len -= 5;
        }
    } else if ((c & 0xc0) == 0x80) {
        flags = avio_r8(s->pb);
        header_len = avio_r8(s->pb);
        len -= 2;
        if (header_len > len)
            goto error_redo;
        len -= header_len;
        if (flags & 0x80) {
            dts = pts = get_pts(s->pb, -1);
            header_len -= 5;
            if (flags & 0x40) {
                dts = get_pts(s->pb, -1);
                header_len -= 5;
            }
        }
        if (flags & 0x3f && header_len == 0){
            flags &= 0xC0;
            av_log(s, AV_LOG_WARNING, "Further flags set but no bytes left\n");
        }
        if (flags & 0x01) {
            pes_ext = avio_r8(s->pb);
            header_len--;
            skip = (pes_ext >> 4) & 0xb;
            skip += skip & 0x9;
            if (pes_ext & 0x40 || skip > header_len){
                av_log(s, AV_LOG_WARNING, "pes_ext %X is invalid\n", pes_ext);
                pes_ext=skip=0;
            }
            avio_skip(s->pb, skip);
            header_len -= skip;
            if (pes_ext & 0x01) {
                ext2_len = avio_r8(s->pb);
                header_len--;
                if ((ext2_len & 0x7f) > 0) {
                    id_ext = avio_r8(s->pb);
                    if ((id_ext & 0x80) == 0)
                        startcode = ((startcode & 0xff) << 8) | id_ext;
                    header_len--;
                }
            }
        }
        if(header_len < 0)
            goto error_redo;
        avio_skip(s->pb, header_len);
    }
    else if( c!= 0xf )
        goto redo;
    if (startcode == PRIVATE_STREAM_1 && !m->psm_es_type[startcode & 0xff]) {
        startcode = avio_r8(s->pb);
        len--;
        if (startcode >= 0x80 && startcode <= 0xcf) {
            avio_r8(s->pb);
            avio_r8(s->pb);
            avio_r8(s->pb);
            len -= 3;
            if (startcode >= 0xb0 && startcode <= 0xbf) {
                avio_r8(s->pb);
                len--;
            }
        }
    }
    if(len<0)
        goto error_redo;
    if(dts != AV_NOPTS_VALUE && ppos){
        int i;
        for(i=0; i<s->nb_streams; i++){
            if(startcode == s->streams[i]->id &&
               s->pb->seekable  ) {
                ff_reduce_index(s, i);
                av_add_index_entry(s->streams[i], *ppos, dts, 0, 0, AVINDEX_KEYFRAME  );
            }
        }
    }
    *pstart_code = startcode;
    *ppts = pts;
    *pdts = dts;
    return len;
}
['static int mpegps_read_pes_header(AVFormatContext *s,\n                                  int64_t *ppos, int *pstart_code,\n                                  int64_t *ppts, int64_t *pdts)\n{\n    MpegDemuxContext *m = s->priv_data;\n    int len, size, startcode, c, flags, header_len;\n    int pes_ext, ext2_len, id_ext, skip;\n    int64_t pts, dts;\n    int64_t last_sync= avio_tell(s->pb);\n error_redo:\n        avio_seek(s->pb, last_sync, SEEK_SET);\n redo:\n        m->header_state = 0xff;\n        size = MAX_SYNC_SIZE;\n        startcode = find_next_start_code(s->pb, &size, &m->header_state);\n        last_sync = avio_tell(s->pb);\n    if (startcode < 0){\n        if(s->pb->eof_reached)\n            return AVERROR_EOF;\n        return AVERROR(EAGAIN);\n    }\n    if (startcode == PACK_START_CODE)\n        goto redo;\n    if (startcode == SYSTEM_HEADER_START_CODE)\n        goto redo;\n    if (startcode == PADDING_STREAM) {\n        avio_skip(s->pb, avio_rb16(s->pb));\n        goto redo;\n    }\n    if (startcode == PRIVATE_STREAM_2) {\n        len = avio_rb16(s->pb);\n        if (!m->sofdec) {\n            while (len-- >= 6) {\n                if (avio_r8(s->pb) == \'S\') {\n                    uint8_t buf[5];\n                    avio_read(s->pb, buf, sizeof(buf));\n                    m->sofdec = !memcmp(buf, "ofdec", 5);\n                    len -= sizeof(buf);\n                    break;\n                }\n            }\n            m->sofdec -= !m->sofdec;\n        }\n        avio_skip(s->pb, len);\n        goto redo;\n    }\n    if (startcode == PROGRAM_STREAM_MAP) {\n        mpegps_psm_parse(m, s->pb);\n        goto redo;\n    }\n    if (!((startcode >= 0x1c0 && startcode <= 0x1df) ||\n          (startcode >= 0x1e0 && startcode <= 0x1ef) ||\n          (startcode == 0x1bd) || (startcode == 0x1fd)))\n        goto redo;\n    if (ppos) {\n        *ppos = avio_tell(s->pb) - 4;\n    }\n    len = avio_rb16(s->pb);\n    pts =\n    dts = AV_NOPTS_VALUE;\n    for(;;) {\n        if (len < 1)\n            goto error_redo;\n        c = avio_r8(s->pb);\n        len--;\n        if (c != 0xff)\n            break;\n    }\n    if ((c & 0xc0) == 0x40) {\n        avio_r8(s->pb);\n        c = avio_r8(s->pb);\n        len -= 2;\n    }\n    if ((c & 0xe0) == 0x20) {\n        dts = pts = get_pts(s->pb, c);\n        len -= 4;\n        if (c & 0x10){\n            dts = get_pts(s->pb, -1);\n            len -= 5;\n        }\n    } else if ((c & 0xc0) == 0x80) {\n        flags = avio_r8(s->pb);\n        header_len = avio_r8(s->pb);\n        len -= 2;\n        if (header_len > len)\n            goto error_redo;\n        len -= header_len;\n        if (flags & 0x80) {\n            dts = pts = get_pts(s->pb, -1);\n            header_len -= 5;\n            if (flags & 0x40) {\n                dts = get_pts(s->pb, -1);\n                header_len -= 5;\n            }\n        }\n        if (flags & 0x3f && header_len == 0){\n            flags &= 0xC0;\n            av_log(s, AV_LOG_WARNING, "Further flags set but no bytes left\\n");\n        }\n        if (flags & 0x01) {\n            pes_ext = avio_r8(s->pb);\n            header_len--;\n            skip = (pes_ext >> 4) & 0xb;\n            skip += skip & 0x9;\n            if (pes_ext & 0x40 || skip > header_len){\n                av_log(s, AV_LOG_WARNING, "pes_ext %X is invalid\\n", pes_ext);\n                pes_ext=skip=0;\n            }\n            avio_skip(s->pb, skip);\n            header_len -= skip;\n            if (pes_ext & 0x01) {\n                ext2_len = avio_r8(s->pb);\n                header_len--;\n                if ((ext2_len & 0x7f) > 0) {\n                    id_ext = avio_r8(s->pb);\n                    if ((id_ext & 0x80) == 0)\n                        startcode = ((startcode & 0xff) << 8) | id_ext;\n                    header_len--;\n                }\n            }\n        }\n        if(header_len < 0)\n            goto error_redo;\n        avio_skip(s->pb, header_len);\n    }\n    else if( c!= 0xf )\n        goto redo;\n    if (startcode == PRIVATE_STREAM_1 && !m->psm_es_type[startcode & 0xff]) {\n        startcode = avio_r8(s->pb);\n        len--;\n        if (startcode >= 0x80 && startcode <= 0xcf) {\n            avio_r8(s->pb);\n            avio_r8(s->pb);\n            avio_r8(s->pb);\n            len -= 3;\n            if (startcode >= 0xb0 && startcode <= 0xbf) {\n                avio_r8(s->pb);\n                len--;\n            }\n        }\n    }\n    if(len<0)\n        goto error_redo;\n    if(dts != AV_NOPTS_VALUE && ppos){\n        int i;\n        for(i=0; i<s->nb_streams; i++){\n            if(startcode == s->streams[i]->id &&\n               s->pb->seekable  ) {\n                ff_reduce_index(s, i);\n                av_add_index_entry(s->streams[i], *ppos, dts, 0, 0, AVINDEX_KEYFRAME  );\n            }\n        }\n    }\n    *pstart_code = startcode;\n    *ppts = pts;\n    *pdts = dts;\n    return len;\n}']