summaryrefslogtreecommitdiffstats
path: root/video/decode/vdpau.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/decode/vdpau.c')
-rw-r--r--video/decode/vdpau.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/video/decode/vdpau.c b/video/decode/vdpau.c
index 544ced51c3..74e5ae7063 100644
--- a/video/decode/vdpau.c
+++ b/video/decode/vdpau.c
@@ -69,24 +69,12 @@ static const struct hwdec_profile_entry profiles[] = {
{0}
};
-// libavcodec absolutely wants a non-NULL render callback
-static VdpStatus dummy_render(
- VdpDecoder decoder,
- VdpVideoSurface target,
- VdpPictureInfo const * picture_info,
- uint32_t bitstream_buffer_count,
- VdpBitstreamBuffer const * bitstream_buffers)
-{
- return VDP_STATUS_DISPLAY_PREEMPTED;
-}
-
static void mark_uninitialized(struct lavc_ctx *ctx)
{
struct priv *p = ctx->hwdec_priv;
p->vdp_device = VDP_INVALID_HANDLE;
p->context.decoder = VDP_INVALID_HANDLE;
- p->context.render = dummy_render;
}
static int handle_preemption(struct lavc_ctx *ctx)
@@ -148,14 +136,12 @@ static bool create_vdp_decoder(struct lavc_ctx *ctx)
p->vid_width, p->vid_height, maxrefs,
&p->context.decoder);
CHECK_ST_WARNING("Failed creating VDPAU decoder");
- p->context.render = p->vdp->decoder_render;
if (vdp_st != VDP_STATUS_OK)
goto fail;
return true;
fail:
p->context.decoder = VDP_INVALID_HANDLE;
- p->context.render = dummy_render;
return false;
}
@@ -207,6 +193,8 @@ static int init(struct lavc_ctx *ctx)
};
ctx->hwdec_priv = p;
+ p->context.render = p->vdp->decoder_render;
+
p->preemption_counter = p->mpvdp->preemption_counter;
mark_uninitialized(ctx);