int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src)

{

    int ret;



    dst->owner = src->owner;



    ret = av_frame_ref(dst->f, src->f);

    if (ret < 0)

        return ret;



    av_assert0(!dst->progress);



    if (src->progress &&

        !(dst->progress = av_buffer_ref(src->progress))) {

        ff_thread_release_buffer(dst->owner, dst);

        return AVERROR(ENOMEM);

    }



    return 0;

}

int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src)

{

    int ret;



    dst->owner = src->owner;



    ret = av_frame_ref(dst->f, src->f);

    if (ret < 0)

        return ret;



    av_assert0(!dst->progress);



    if (src->progress &&

        !(dst->progress = av_buffer_ref(src->progress))) {

        ff_thread_release_buffer(dst->owner, dst);

        return AVERROR(ENOMEM);

    }



    return 0;

}

    dst->owner = src->owner;         ff_thread_release_buffer(dst->owner, dst);
int FUNC_0(ThreadFrame *VAR_0, ThreadFrame *VAR_1)

{

    int VAR_2;



    VAR_0->owner = VAR_1->owner;



    VAR_2 = av_frame_ref(VAR_0->f, VAR_1->f);

    if (VAR_2 < 0)

        return VAR_2;



    av_assert0(!VAR_0->progress);



    if (VAR_1->progress &&

        !(VAR_0->progress = av_buffer_ref(VAR_1->progress))) {

        ff_thread_release_buffer(VAR_0->owner, VAR_0);

        return AVERROR(ENOMEM);

    }



    return 0;

}

int FUNC_0(ThreadFrame *VAR_0, ThreadFrame *VAR_1)
{ int VAR_2; VAR_0->owner = VAR_1->owner; VAR_2 = av_frame_ref(VAR_0->f, VAR_1->f); if (VAR_2 < 0)
return VAR_2; av_assert0(!VAR_0->progress); if (VAR_1->progress &&
!(VAR_0->progress = av_buffer_ref(VAR_1->progress))) { ff_thread_release_buffer(VAR_0->owner, VAR_0); return AVERROR(ENOMEM); } return 0; }