libavcodec/cinepakenc.c:765: error: Uninitialized Value
  The value read from best_size was never initialized.

libavcodec/cinepakenc.c:765:5: 
763.     memcpy(buf, s->frame_buf, best_size);
764. 
765.     return best_size;
         ^
766. }
767. 

static int rd_frame(CinepakEncContext *s, AVFrame *frame, unsigned char *buf, int buf_size)
{
    int num_strips, strip, h, i, y, size, temp_size, best_size;
    AVPicture last_pict, pict, scratch_pict;
    int64_t best_score = 0, score, score_temp;
    for(num_strips = MIN_STRIPS; num_strips <= MAX_STRIPS && num_strips <= s->h / MB_SIZE; num_strips++) {
        score = 0;
        size = 0;
        h = s->h / num_strips;
        h += 4 - (h & 3);
        for(strip = 0; strip < num_strips; strip++) {
            y = strip*h;
            get_sub_picture(s, 0, y, (AVPicture*)frame,            &pict);
            get_sub_picture(s, 0, y, (AVPicture*)&s->last_frame,    &last_pict);
            get_sub_picture(s, 0, y, (AVPicture*)&s->scratch_frame, &scratch_pict);
            if((temp_size = rd_strip(s, y, FFMIN(h, s->h - y), frame->key_frame, &last_pict, &pict, &scratch_pict, s->frame_buf + CVID_HEADER_SIZE, &score_temp)) < 0)
                return temp_size;
            score += score_temp;
            size += temp_size;
        }
        if(best_score == 0 || score < best_score) {
            best_score = score;
            best_size = size + write_cvid_header(s, s->frame_buf, num_strips, size);
            av_log(s->avctx, AV_LOG_INFO, "best number of strips so far: %2i, %12li, %i B\n", num_strips, score, best_size);
            FFSWAP(AVFrame, s->best_frame, s->scratch_frame);
        }
    }
    memcpy(buf, s->frame_buf, best_size);
    return best_size;
}
['static int rd_frame(CinepakEncContext *s, AVFrame *frame, unsigned char *buf, int buf_size)\n{\n    int num_strips, strip, h, i, y, size, temp_size, best_size;\n    AVPicture last_pict, pict, scratch_pict;\n    int64_t best_score = 0, score, score_temp;\n    for(num_strips = MIN_STRIPS; num_strips <= MAX_STRIPS && num_strips <= s->h / MB_SIZE; num_strips++) {\n        score = 0;\n        size = 0;\n        h = s->h / num_strips;\n        h += 4 - (h & 3);\n        for(strip = 0; strip < num_strips; strip++) {\n            y = strip*h;\n            get_sub_picture(s, 0, y, (AVPicture*)frame,            &pict);\n            get_sub_picture(s, 0, y, (AVPicture*)&s->last_frame,    &last_pict);\n            get_sub_picture(s, 0, y, (AVPicture*)&s->scratch_frame, &scratch_pict);\n            if((temp_size = rd_strip(s, y, FFMIN(h, s->h - y), frame->key_frame, &last_pict, &pict, &scratch_pict, s->frame_buf + CVID_HEADER_SIZE, &score_temp)) < 0)\n                return temp_size;\n            score += score_temp;\n            size += temp_size;\n        }\n        if(best_score == 0 || score < best_score) {\n            best_score = score;\n            best_size = size + write_cvid_header(s, s->frame_buf, num_strips, size);\n            av_log(s->avctx, AV_LOG_INFO, "best number of strips so far: %2i, %12li, %i B\\n", num_strips, score, best_size);\n            FFSWAP(AVFrame, s->best_frame, s->scratch_frame);\n        }\n    }\n    memcpy(buf, s->frame_buf, best_size);\n    return best_size;\n}']