libavformat/rmdec.c:502: error: Uninitialized Value
  The value read from pic_num was never initialized.

libavformat/rmdec.c:502:9: 
500.         rm->videobufpos = 8*rm->slices + 1;
501.         rm->cur_slice = 0;
502.         rm->curpic_num = pic_num;
             ^
503.         rm->pktpos = url_ftell(pb);
504.     }

static int rm_assemble_video_frame(AVFormatContext *s, RMContext *rm, AVPacket *pkt, int len)
{
    ByteIOContext *pb = s->pb;
    int hdr, seq, pic_num, len2, pos;
    int type;
    hdr = get_byte(pb); len--;
    type = hdr >> 6;
    switch(type){
    case 0:
    case 2:
        seq = get_byte(pb); len--;
        len2 = get_num(pb, &len);
        pos = get_num(pb, &len);
        pic_num = get_byte(pb); len--;
        rm->remaining_len = len;
        break;
    case 1:
        seq = get_byte(pb); len--;
        if(av_new_packet(pkt, len + 9) < 0)
            return AVERROR(EIO);
        pkt->data[0] = 0;
        AV_WL32(pkt->data + 1, 1);
        AV_WL32(pkt->data + 5, 0);
        get_buffer(pb, pkt->data + 9, len);
        rm->remaining_len = 0;
        return 0;
    case 3:
        len2 = get_num(pb, &len);
        pos = get_num(pb, &len);
        pic_num = get_byte(pb); len--;
        rm->remaining_len = len - len2;
        if(av_new_packet(pkt, len2 + 9) < 0)
            return AVERROR(EIO);
        pkt->data[0] = 0;
        AV_WL32(pkt->data + 1, 1);
        AV_WL32(pkt->data + 5, 0);
        get_buffer(pb, pkt->data + 9, len2);
        return 0;
    }
    if((seq & 0x7F) == 1 || rm->curpic_num != pic_num){
        rm->slices = ((hdr & 0x3F) << 1) + 1;
        rm->videobufsize = len2 + 8*rm->slices + 1;
        av_free(rm->videobuf);
        if(!(rm->videobuf = av_malloc(rm->videobufsize)))
            return AVERROR(ENOMEM);
        rm->videobufpos = 8*rm->slices + 1;
        rm->cur_slice = 0;
        rm->curpic_num = pic_num;
        rm->pktpos = url_ftell(pb);
    }
    if(type == 2)
        len = FFMIN(len, pos);
    if(++rm->cur_slice > rm->slices)
        return 1;
    AV_WL32(rm->videobuf - 7 + 8*rm->cur_slice, 1);
    AV_WL32(rm->videobuf - 3 + 8*rm->cur_slice, rm->videobufpos - 8*rm->slices - 1);
    if(rm->videobufpos + len > rm->videobufsize)
        return 1;
    if (get_buffer(pb, rm->videobuf + rm->videobufpos, len) != len)
        return AVERROR(EIO);
    rm->videobufpos += len;
    rm->remaining_len-= len;
    if(type == 2 || (rm->videobufpos) == rm->videobufsize){
         rm->videobuf[0] = rm->cur_slice-1;
         if(av_new_packet(pkt, rm->videobufpos - 8*(rm->slices - rm->cur_slice)) < 0)
             return AVERROR(ENOMEM);
         memcpy(pkt->data, rm->videobuf, 1 + 8*rm->cur_slice);
         memcpy(pkt->data + 1 + 8*rm->cur_slice, rm->videobuf + 1 + 8*rm->slices,
                rm->videobufpos - 1 - 8*rm->slices);
         pkt->pts = AV_NOPTS_VALUE;
         pkt->pos = rm->pktpos;
         return 0;
    }
    return 1;
}
['static int rm_assemble_video_frame(AVFormatContext *s, RMContext *rm, AVPacket *pkt, int len)\n{\n    ByteIOContext *pb = s->pb;\n    int hdr, seq, pic_num, len2, pos;\n    int type;\n    hdr = get_byte(pb); len--;\n    type = hdr >> 6;\n    switch(type){\n    case 0:\n    case 2:\n        seq = get_byte(pb); len--;\n        len2 = get_num(pb, &len);\n        pos = get_num(pb, &len);\n        pic_num = get_byte(pb); len--;\n        rm->remaining_len = len;\n        break;\n    case 1:\n        seq = get_byte(pb); len--;\n        if(av_new_packet(pkt, len + 9) < 0)\n            return AVERROR(EIO);\n        pkt->data[0] = 0;\n        AV_WL32(pkt->data + 1, 1);\n        AV_WL32(pkt->data + 5, 0);\n        get_buffer(pb, pkt->data + 9, len);\n        rm->remaining_len = 0;\n        return 0;\n    case 3:\n        len2 = get_num(pb, &len);\n        pos = get_num(pb, &len);\n        pic_num = get_byte(pb); len--;\n        rm->remaining_len = len - len2;\n        if(av_new_packet(pkt, len2 + 9) < 0)\n            return AVERROR(EIO);\n        pkt->data[0] = 0;\n        AV_WL32(pkt->data + 1, 1);\n        AV_WL32(pkt->data + 5, 0);\n        get_buffer(pb, pkt->data + 9, len2);\n        return 0;\n    }\n    if((seq & 0x7F) == 1 || rm->curpic_num != pic_num){\n        rm->slices = ((hdr & 0x3F) << 1) + 1;\n        rm->videobufsize = len2 + 8*rm->slices + 1;\n        av_free(rm->videobuf);\n        if(!(rm->videobuf = av_malloc(rm->videobufsize)))\n            return AVERROR(ENOMEM);\n        rm->videobufpos = 8*rm->slices + 1;\n        rm->cur_slice = 0;\n        rm->curpic_num = pic_num;\n        rm->pktpos = url_ftell(pb);\n    }\n    if(type == 2)\n        len = FFMIN(len, pos);\n    if(++rm->cur_slice > rm->slices)\n        return 1;\n    AV_WL32(rm->videobuf - 7 + 8*rm->cur_slice, 1);\n    AV_WL32(rm->videobuf - 3 + 8*rm->cur_slice, rm->videobufpos - 8*rm->slices - 1);\n    if(rm->videobufpos + len > rm->videobufsize)\n        return 1;\n    if (get_buffer(pb, rm->videobuf + rm->videobufpos, len) != len)\n        return AVERROR(EIO);\n    rm->videobufpos += len;\n    rm->remaining_len-= len;\n    if(type == 2 || (rm->videobufpos) == rm->videobufsize){\n         rm->videobuf[0] = rm->cur_slice-1;\n         if(av_new_packet(pkt, rm->videobufpos - 8*(rm->slices - rm->cur_slice)) < 0)\n             return AVERROR(ENOMEM);\n         memcpy(pkt->data, rm->videobuf, 1 + 8*rm->cur_slice);\n         memcpy(pkt->data + 1 + 8*rm->cur_slice, rm->videobuf + 1 + 8*rm->slices,\n                rm->videobufpos - 1 - 8*rm->slices);\n         pkt->pts = AV_NOPTS_VALUE;\n         pkt->pos = rm->pktpos;\n         return 0;\n    }\n    return 1;\n}']