summaryrefslogtreecommitdiffstats
path: root/libavcodec/dxva2_mpeg2.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dxva2_mpeg2.c')
-rw-r--r--libavcodec/dxva2_mpeg2.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
index f050ed9..2c012a7 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -251,13 +251,17 @@ static int end_frame(AVCodecContext *avctx)
struct MpegEncContext *s = avctx->priv_data;
struct dxva2_picture_context *ctx_pic =
s->current_picture_ptr->f.hwaccel_picture_private;
+ int ret;
if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
return -1;
- return ff_dxva2_common_end_frame(avctx, s,
- &ctx_pic->pp, sizeof(ctx_pic->pp),
- &ctx_pic->qm, sizeof(ctx_pic->qm),
- commit_bitstream_and_slice_buffer);
+ ret = ff_dxva2_common_end_frame(avctx, s->current_picture_ptr,
+ &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;
}
AVHWAccel ff_mpeg2_dxva2_hwaccel = {
OpenPOWER on IntegriCloud