libavcodec/h264.c:3280: error: Uninitialized Value
  The value read from frame_num was never initialized.

libavcodec/h264.c:3280:9: 
3278. 
3279.     for(i=0; i<mmco_count; i++){
3280.         int structure, av_uninit(frame_num);
              ^
3281.         if(s->avctx->debug&FF_DEBUG_MMCO)
3282.             av_log(h->s.avctx, AV_LOG_DEBUG, "mmco:%d %d %d\n", h->mmco[i].opcode, h->mmco[i].short_pic_num, h->mmco[i].long_arg);

static int execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){
    MpegEncContext * const s = &h->s;
    int i, j;
    int current_ref_assigned=0;
    Picture *av_uninit(pic);
    if((s->avctx->debug&FF_DEBUG_MMCO) && mmco_count==0)
        av_log(h->s.avctx, AV_LOG_DEBUG, "no mmco here\n");
    for(i=0; i<mmco_count; i++){
        int structure, av_uninit(frame_num);
        if(s->avctx->debug&FF_DEBUG_MMCO)
            av_log(h->s.avctx, AV_LOG_DEBUG, "mmco:%d %d %d\n", h->mmco[i].opcode, h->mmco[i].short_pic_num, h->mmco[i].long_arg);
        if(   mmco[i].opcode == MMCO_SHORT2UNUSED
           || mmco[i].opcode == MMCO_SHORT2LONG){
            frame_num = pic_num_extract(h, mmco[i].short_pic_num, &structure);
            pic = find_short(h, frame_num, &j);
            if(!pic){
                if(mmco[i].opcode != MMCO_SHORT2LONG || !h->long_ref[mmco[i].long_arg]
                   || h->long_ref[mmco[i].long_arg]->frame_num != frame_num)
                av_log(h->s.avctx, AV_LOG_ERROR, "mmco: unref short failure\n");
                continue;
            }
        }
        switch(mmco[i].opcode){
        case MMCO_SHORT2UNUSED:
            if(s->avctx->debug&FF_DEBUG_MMCO)
                av_log(h->s.avctx, AV_LOG_DEBUG, "mmco: unref short %d count %d\n", h->mmco[i].short_pic_num, h->short_ref_count);
            remove_short(h, frame_num, structure ^ PICT_FRAME);
            break;
        case MMCO_SHORT2LONG:
                if (h->long_ref[mmco[i].long_arg] != pic)
                    remove_long(h, mmco[i].long_arg, 0);
                remove_short_at_index(h, j);
                h->long_ref[ mmco[i].long_arg ]= pic;
                if (h->long_ref[ mmco[i].long_arg ]){
                    h->long_ref[ mmco[i].long_arg ]->long_ref=1;
                    h->long_ref_count++;
                }
            break;
        case MMCO_LONG2UNUSED:
            j = pic_num_extract(h, mmco[i].long_arg, &structure);
            pic = h->long_ref[j];
            if (pic) {
                remove_long(h, j, structure ^ PICT_FRAME);
            } else if(s->avctx->debug&FF_DEBUG_MMCO)
                av_log(h->s.avctx, AV_LOG_DEBUG, "mmco: unref long failure\n");
            break;
        case MMCO_LONG:
            if (h->long_ref[mmco[i].long_arg] != s->current_picture_ptr) {
                remove_long(h, mmco[i].long_arg, 0);
                h->long_ref[ mmco[i].long_arg ]= s->current_picture_ptr;
                h->long_ref[ mmco[i].long_arg ]->long_ref=1;
                h->long_ref_count++;
            }
            s->current_picture_ptr->reference |= s->picture_structure;
            current_ref_assigned=1;
            break;
        case MMCO_SET_MAX_LONG:
            assert(mmco[i].long_arg <= 16);
            for(j = mmco[i].long_arg; j<16; j++){
                remove_long(h, j, 0);
            }
            break;
        case MMCO_RESET:
            while(h->short_ref_count){
                remove_short(h, h->short_ref[0]->frame_num, 0);
            }
            for(j = 0; j < 16; j++) {
                remove_long(h, j, 0);
            }
            s->current_picture_ptr->poc=
            s->current_picture_ptr->field_poc[0]=
            s->current_picture_ptr->field_poc[1]=
            h->poc_lsb=
            h->poc_msb=
            h->frame_num=
            s->current_picture_ptr->frame_num= 0;
            break;
        default: assert(0);
        }
    }
    if (!current_ref_assigned) {
        if (h->short_ref_count && h->short_ref[0] == s->current_picture_ptr) {
            s->current_picture_ptr->reference = PICT_FRAME;
        } else if (s->current_picture_ptr->long_ref) {
            av_log(h->s.avctx, AV_LOG_ERROR, "illegal short term reference "
                                             "assignment for second field "
                                             "in complementary field pair "
                                             "(first field is long term)\n");
        } else {
            pic= remove_short(h, s->current_picture_ptr->frame_num, 0);
            if(pic){
                av_log(h->s.avctx, AV_LOG_ERROR, "illegal short term buffer state detected\n");
            }
            if(h->short_ref_count)
                memmove(&h->short_ref[1], &h->short_ref[0], h->short_ref_count*sizeof(Picture*));
            h->short_ref[0]= s->current_picture_ptr;
            h->short_ref_count++;
            s->current_picture_ptr->reference |= s->picture_structure;
        }
    }
    if (h->long_ref_count + h->short_ref_count > h->sps.ref_frame_count){
        av_log(h->s.avctx, AV_LOG_ERROR,
               "number of reference frames exceeds max (probably "
               "corrupt input), discarding one\n");
        if (h->long_ref_count && !h->short_ref_count) {
            for (i = 0; i < 16; ++i)
                if (h->long_ref[i])
                    break;
            assert(i < 16);
            remove_long(h, i, 0);
        } else {
            pic = h->short_ref[h->short_ref_count - 1];
            remove_short(h, pic->frame_num, 0);
        }
    }
    print_short_term(h);
    print_long_term(h);
    return 0;
}
['static int execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){\n    MpegEncContext * const s = &h->s;\n    int i, j;\n    int current_ref_assigned=0;\n    Picture *av_uninit(pic);\n    if((s->avctx->debug&FF_DEBUG_MMCO) && mmco_count==0)\n        av_log(h->s.avctx, AV_LOG_DEBUG, "no mmco here\\n");\n    for(i=0; i<mmco_count; i++){\n        int structure, av_uninit(frame_num);\n        if(s->avctx->debug&FF_DEBUG_MMCO)\n            av_log(h->s.avctx, AV_LOG_DEBUG, "mmco:%d %d %d\\n", h->mmco[i].opcode, h->mmco[i].short_pic_num, h->mmco[i].long_arg);\n        if(   mmco[i].opcode == MMCO_SHORT2UNUSED\n           || mmco[i].opcode == MMCO_SHORT2LONG){\n            frame_num = pic_num_extract(h, mmco[i].short_pic_num, &structure);\n            pic = find_short(h, frame_num, &j);\n            if(!pic){\n                if(mmco[i].opcode != MMCO_SHORT2LONG || !h->long_ref[mmco[i].long_arg]\n                   || h->long_ref[mmco[i].long_arg]->frame_num != frame_num)\n                av_log(h->s.avctx, AV_LOG_ERROR, "mmco: unref short failure\\n");\n                continue;\n            }\n        }\n        switch(mmco[i].opcode){\n        case MMCO_SHORT2UNUSED:\n            if(s->avctx->debug&FF_DEBUG_MMCO)\n                av_log(h->s.avctx, AV_LOG_DEBUG, "mmco: unref short %d count %d\\n", h->mmco[i].short_pic_num, h->short_ref_count);\n            remove_short(h, frame_num, structure ^ PICT_FRAME);\n            break;\n        case MMCO_SHORT2LONG:\n                if (h->long_ref[mmco[i].long_arg] != pic)\n                    remove_long(h, mmco[i].long_arg, 0);\n                remove_short_at_index(h, j);\n                h->long_ref[ mmco[i].long_arg ]= pic;\n                if (h->long_ref[ mmco[i].long_arg ]){\n                    h->long_ref[ mmco[i].long_arg ]->long_ref=1;\n                    h->long_ref_count++;\n                }\n            break;\n        case MMCO_LONG2UNUSED:\n            j = pic_num_extract(h, mmco[i].long_arg, &structure);\n            pic = h->long_ref[j];\n            if (pic) {\n                remove_long(h, j, structure ^ PICT_FRAME);\n            } else if(s->avctx->debug&FF_DEBUG_MMCO)\n                av_log(h->s.avctx, AV_LOG_DEBUG, "mmco: unref long failure\\n");\n            break;\n        case MMCO_LONG:\n            if (h->long_ref[mmco[i].long_arg] != s->current_picture_ptr) {\n                remove_long(h, mmco[i].long_arg, 0);\n                h->long_ref[ mmco[i].long_arg ]= s->current_picture_ptr;\n                h->long_ref[ mmco[i].long_arg ]->long_ref=1;\n                h->long_ref_count++;\n            }\n            s->current_picture_ptr->reference |= s->picture_structure;\n            current_ref_assigned=1;\n            break;\n        case MMCO_SET_MAX_LONG:\n            assert(mmco[i].long_arg <= 16);\n            for(j = mmco[i].long_arg; j<16; j++){\n                remove_long(h, j, 0);\n            }\n            break;\n        case MMCO_RESET:\n            while(h->short_ref_count){\n                remove_short(h, h->short_ref[0]->frame_num, 0);\n            }\n            for(j = 0; j < 16; j++) {\n                remove_long(h, j, 0);\n            }\n            s->current_picture_ptr->poc=\n            s->current_picture_ptr->field_poc[0]=\n            s->current_picture_ptr->field_poc[1]=\n            h->poc_lsb=\n            h->poc_msb=\n            h->frame_num=\n            s->current_picture_ptr->frame_num= 0;\n            break;\n        default: assert(0);\n        }\n    }\n    if (!current_ref_assigned) {\n        if (h->short_ref_count && h->short_ref[0] == s->current_picture_ptr) {\n            s->current_picture_ptr->reference = PICT_FRAME;\n        } else if (s->current_picture_ptr->long_ref) {\n            av_log(h->s.avctx, AV_LOG_ERROR, "illegal short term reference "\n                                             "assignment for second field "\n                                             "in complementary field pair "\n                                             "(first field is long term)\\n");\n        } else {\n            pic= remove_short(h, s->current_picture_ptr->frame_num, 0);\n            if(pic){\n                av_log(h->s.avctx, AV_LOG_ERROR, "illegal short term buffer state detected\\n");\n            }\n            if(h->short_ref_count)\n                memmove(&h->short_ref[1], &h->short_ref[0], h->short_ref_count*sizeof(Picture*));\n            h->short_ref[0]= s->current_picture_ptr;\n            h->short_ref_count++;\n            s->current_picture_ptr->reference |= s->picture_structure;\n        }\n    }\n    if (h->long_ref_count + h->short_ref_count > h->sps.ref_frame_count){\n        av_log(h->s.avctx, AV_LOG_ERROR,\n               "number of reference frames exceeds max (probably "\n               "corrupt input), discarding one\\n");\n        if (h->long_ref_count && !h->short_ref_count) {\n            for (i = 0; i < 16; ++i)\n                if (h->long_ref[i])\n                    break;\n            assert(i < 16);\n            remove_long(h, i, 0);\n        } else {\n            pic = h->short_ref[h->short_ref_count - 1];\n            remove_short(h, pic->frame_num, 0);\n        }\n    }\n    print_short_term(h);\n    print_long_term(h);\n    return 0;\n}']