static int dxva2_mpeg2_end_frame(AVCodecContext *avctx)

{

    struct MpegEncContext *s = avctx->priv_data;

    struct dxva2_picture_context *ctx_pic =

        s->current_picture_ptr->hwaccel_picture_private;

    int ret;



    if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)

        return -1;

    ret = ff_dxva2_common_end_frame(avctx, &s->current_picture_ptr->f,

                                    &ctx_pic->pp, sizeof(ctx_pic->pp),

                                    &ctx_pic->qm, sizeof(ctx_pic->qm),

                                    commit_bitstream_and_slice_buffer);

    if (!ret)

        ff_mpeg_draw_horiz_band(s, 0, avctx->height);

    return ret;

}

static int dxva2_mpeg2_end_frame(AVCodecContext *avctx)

{

    struct MpegEncContext *s = avctx->priv_data;

    struct dxva2_picture_context *ctx_pic =

        s->current_picture_ptr->hwaccel_picture_private;

    int ret;



    if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)

        return -1;

    ret = ff_dxva2_common_end_frame(avctx, &s->current_picture_ptr->f,

                                    &ctx_pic->pp, sizeof(ctx_pic->pp),

                                    &ctx_pic->qm, sizeof(ctx_pic->qm),

                                    commit_bitstream_and_slice_buffer);

    if (!ret)

        ff_mpeg_draw_horiz_band(s, 0, avctx->height);

    return ret;

}

    ret = ff_dxva2_common_end_frame(avctx, &s->current_picture_ptr->f,
static int FUNC_0(AVCodecContext *VAR_0)

{

    struct MpegEncContext *VAR_1 = VAR_0->priv_data;

    struct dxva2_picture_context *VAR_2 =

        VAR_1->current_picture_ptr->hwaccel_picture_private;

    int VAR_3;



    if (VAR_2->slice_count <= 0 || VAR_2->bitstream_size <= 0)

        return -1;

    VAR_3 = ff_dxva2_common_end_frame(VAR_0, &VAR_1->current_picture_ptr->f,

                                    &VAR_2->pp, sizeof(VAR_2->pp),

                                    &VAR_2->qm, sizeof(VAR_2->qm),

                                    commit_bitstream_and_slice_buffer);

    if (!VAR_3)

        ff_mpeg_draw_horiz_band(VAR_1, 0, VAR_0->height);

    return VAR_3;

}

static int FUNC_0(AVCodecContext *VAR_0)
{ struct MpegEncContext *VAR_1 = VAR_0->priv_data; struct dxva2_picture_context *VAR_2 =
VAR_1->current_picture_ptr->hwaccel_picture_private; int VAR_3; if (VAR_2->slice_count <= 0 || VAR_2->bitstream_size <= 0)
return -1; VAR_3 = ff_dxva2_common_end_frame(VAR_0, &VAR_1->current_picture_ptr->f,
&VAR_2->pp, sizeof(VAR_2->pp),
&VAR_2->qm, sizeof(VAR_2->qm),
commit_bitstream_and_slice_buffer); if (!VAR_3)
ff_mpeg_draw_horiz_band(VAR_1, 0, VAR_0->height); return VAR_3; }