libavcodec/pthread_frame.c:501: error: Uninitialized Value
  The value read from ret was never initialized.

libavcodec/pthread_frame.c:501:5: 
499.     if (err < 0)
500.         return err;
501.     return ret;
         ^
502. }
503. 

int ff_thread_decode_frame(AVCodecContext *avctx,
                           AVFrame *picture, int *got_picture_ptr,
                           AVPacket *avpkt)
{
    FrameThreadContext *fctx = avctx->internal->thread_ctx;
    int finished = fctx->next_finished;
    PerThreadContext *p;
    int err, ret;
    pthread_mutex_unlock(&fctx->async_mutex);
    p = &fctx->threads[fctx->next_decoding];
    err = update_context_from_user(p->avctx, avctx);
    if (err)
        goto finish;
    err = submit_packet(p, avpkt);
    if (err)
        goto finish;
    if (fctx->delaying) {
        if (fctx->next_decoding >= (avctx->thread_count-1)) fctx->delaying = 0;
        *got_picture_ptr=0;
        if (avpkt->size) {
            ret = avpkt->size;
            goto finish;
        }
    }
    do {
        p = &fctx->threads[finished++];
        if (atomic_load(&p->state) != STATE_INPUT_READY) {
            pthread_mutex_lock(&p->progress_mutex);
            while (atomic_load_explicit(&p->state, memory_order_relaxed) != STATE_INPUT_READY)
                pthread_cond_wait(&p->output_cond, &p->progress_mutex);
            pthread_mutex_unlock(&p->progress_mutex);
        }
        av_frame_move_ref(picture, p->frame);
        *got_picture_ptr = p->got_frame;
        picture->pkt_dts = p->avpkt.dts;
        p->got_frame = 0;
        if (finished >= avctx->thread_count) finished = 0;
    } while (!avpkt->size && !*got_picture_ptr && finished != fctx->next_finished);
    update_context_from_thread(avctx, p->avctx, 1);
    if (fctx->next_decoding >= avctx->thread_count) fctx->next_decoding = 0;
    fctx->next_finished = finished;
    ret = (p->result >= 0) ? avpkt->size : p->result;
finish:
    pthread_mutex_lock(&fctx->async_mutex);
    if (err < 0)
        return err;
    return ret;
}
['int ff_thread_decode_frame(AVCodecContext *avctx,\n                           AVFrame *picture, int *got_picture_ptr,\n                           AVPacket *avpkt)\n{\n    FrameThreadContext *fctx = avctx->internal->thread_ctx;\n    int finished = fctx->next_finished;\n    PerThreadContext *p;\n    int err, ret;\n    pthread_mutex_unlock(&fctx->async_mutex);\n    p = &fctx->threads[fctx->next_decoding];\n    err = update_context_from_user(p->avctx, avctx);\n    if (err)\n        goto finish;\n    err = submit_packet(p, avpkt);\n    if (err)\n        goto finish;\n    if (fctx->delaying) {\n        if (fctx->next_decoding >= (avctx->thread_count-1)) fctx->delaying = 0;\n        *got_picture_ptr=0;\n        if (avpkt->size) {\n            ret = avpkt->size;\n            goto finish;\n        }\n    }\n    do {\n        p = &fctx->threads[finished++];\n        if (atomic_load(&p->state) != STATE_INPUT_READY) {\n            pthread_mutex_lock(&p->progress_mutex);\n            while (atomic_load_explicit(&p->state, memory_order_relaxed) != STATE_INPUT_READY)\n                pthread_cond_wait(&p->output_cond, &p->progress_mutex);\n            pthread_mutex_unlock(&p->progress_mutex);\n        }\n        av_frame_move_ref(picture, p->frame);\n        *got_picture_ptr = p->got_frame;\n        picture->pkt_dts = p->avpkt.dts;\n        p->got_frame = 0;\n        if (finished >= avctx->thread_count) finished = 0;\n    } while (!avpkt->size && !*got_picture_ptr && finished != fctx->next_finished);\n    update_context_from_thread(avctx, p->avctx, 1);\n    if (fctx->next_decoding >= avctx->thread_count) fctx->next_decoding = 0;\n    fctx->next_finished = finished;\n    ret = (p->result >= 0) ? avpkt->size : p->result;\nfinish:\n    pthread_mutex_lock(&fctx->async_mutex);\n    if (err < 0)\n        return err;\n    return ret;\n}']