From f2110f582d0432d59f743565e75c0a16ef1f8668 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 7 Jul 2016 16:10:53 +0200 Subject: vo_vdpau: minor simplification Remove some indirections that aren't needed anymore. --- video/out/vo_vdpau.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) (limited to 'video/out/vo_vdpau.c') diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c index 75069b0666..6dd31e9082 100644 --- a/video/out/vo_vdpau.c +++ b/video/out/vo_vdpau.c @@ -141,18 +141,17 @@ struct vdpctx { }; static bool status_ok(struct vo *vo); -static void draw_osd(struct vo *vo); -static int render_video_to_output_surface(struct vo *vo, - VdpOutputSurface output_surface, - VdpRect *output_rect, - VdpRect *video_rect) +static int video_to_output_surface(struct vo *vo, struct mp_image *mpi) { struct vdpctx *vc = vo->priv; struct vdp_functions *vdp = vc->vdp; VdpTime dummy; VdpStatus vdp_st; - struct mp_image *mpi = vc->current_image; + + VdpOutputSurface output_surface = vc->output_surfaces[vc->surface_num]; + VdpRect *output_rect = &vc->out_rect_vid; + VdpRect *video_rect = &vc->src_rect_vid; vdp_st = vdp->presentation_queue_block_until_surface_idle(vc->flip_queue, output_surface, @@ -235,17 +234,6 @@ static int render_video_to_output_surface(struct vo *vo, return 0; } -static int video_to_output_surface(struct vo *vo) -{ - struct vdpctx *vc = vo->priv; - - int r = render_video_to_output_surface(vo, - vc->output_surfaces[vc->surface_num], - &vc->out_rect_vid, &vc->src_rect_vid); - draw_osd(vo); - return r; -} - static void forget_frames(struct vo *vo, bool seek_reset) { struct vdpctx *vc = vo->priv; @@ -899,8 +887,10 @@ static void draw_frame(struct vo *vo, struct vo_frame *frame) vc->current_pts = frame->pts; vc->current_duration = frame->duration; - if (status_ok(vo)) - video_to_output_surface(vo); + if (status_ok(vo)) { + video_to_output_surface(vo, vc->current_image); + draw_osd(vo); + } } // warning: the size and pixel format of surface must match that of the -- cgit v1.2.3