static void unref_picture(H264Context *h, Picture *pic)

{

    int off = offsetof(Picture, tf) + sizeof(pic->tf);

    int i;



    if (!pic->f.data[0])

        return;



    ff_thread_release_buffer(h->avctx, &pic->tf);

    av_buffer_unref(&pic->hwaccel_priv_buf);



    av_buffer_unref(&pic->qscale_table_buf);

    av_buffer_unref(&pic->mb_type_buf);

    for (i = 0; i < 2; i++) {

        av_buffer_unref(&pic->motion_val_buf[i]);

        av_buffer_unref(&pic->ref_index_buf[i]);

    }



    memset((uint8_t*)pic + off, 0, sizeof(*pic) - off);

}

static void unref_picture(H264Context *h, Picture *pic)

{

    int off = offsetof(Picture, tf) + sizeof(pic->tf);

    int i;



    if (!pic->f.data[0])

        return;



    ff_thread_release_buffer(h->avctx, &pic->tf);

    av_buffer_unref(&pic->hwaccel_priv_buf);



    av_buffer_unref(&pic->qscale_table_buf);

    av_buffer_unref(&pic->mb_type_buf);

    for (i = 0; i < 2; i++) {

        av_buffer_unref(&pic->motion_val_buf[i]);

        av_buffer_unref(&pic->ref_index_buf[i]);

    }



    memset((uint8_t*)pic + off, 0, sizeof(*pic) - off);

}

static void FUNC_0(H264Context *VAR_0, Picture *VAR_1)

{

    int VAR_2 = offsetof(Picture, tf) + sizeof(VAR_1->tf);

    int VAR_3;



    if (!VAR_1->f.data[0])

        return;



    ff_thread_release_buffer(VAR_0->avctx, &VAR_1->tf);

    av_buffer_unref(&VAR_1->hwaccel_priv_buf);



    av_buffer_unref(&VAR_1->qscale_table_buf);

    av_buffer_unref(&VAR_1->mb_type_buf);

    for (VAR_3 = 0; VAR_3 < 2; VAR_3++) {

        av_buffer_unref(&VAR_1->motion_val_buf[VAR_3]);

        av_buffer_unref(&VAR_1->ref_index_buf[VAR_3]);

    }



    memset((uint8_t*)VAR_1 + VAR_2, 0, sizeof(*VAR_1) - VAR_2);

}

static void FUNC_0(H264Context *VAR_0, Picture *VAR_1)
{ int VAR_2 = offsetof(Picture, tf) + sizeof(VAR_1->tf); int VAR_3; if (!VAR_1->f.data[0])
return; ff_thread_release_buffer(VAR_0->avctx, &VAR_1->tf); av_buffer_unref(&VAR_1->hwaccel_priv_buf); av_buffer_unref(&VAR_1->qscale_table_buf); av_buffer_unref(&VAR_1->mb_type_buf); for (VAR_3 = 0; VAR_3 < 2; VAR_3++) { av_buffer_unref(&VAR_1->motion_val_buf[VAR_3]); av_buffer_unref(&VAR_1->ref_index_buf[VAR_3]); } memset((uint8_t*)VAR_1 + VAR_2, 0, sizeof(*VAR_1) - VAR_2); }