mirror of
https://github.com/mpv-player/mpv
synced 2024-09-09 01:16:56 +02:00
vdpau: remove pointer indirection for a field
There's no reason to. This is basically a cosmetic change.
This commit is contained in:
parent
917650fefa
commit
9be93d6b60
@ -83,7 +83,7 @@ static int handle_preemption(struct lavc_ctx *ctx)
|
||||
}
|
||||
|
||||
p->vdp_device = p->mpvdp->vdp_device;
|
||||
p->vdp = p->mpvdp->vdp;
|
||||
p->vdp = &p->mpvdp->vdp;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -91,7 +91,7 @@ static int handle_preemption(struct lavc_ctx *ctx)
|
||||
static int init_decoder(struct lavc_ctx *ctx, int fmt, int w, int h)
|
||||
{
|
||||
struct priv *p = ctx->hwdec_priv;
|
||||
struct vdp_functions *vdp = p->mpvdp->vdp;
|
||||
struct vdp_functions *vdp = &p->mpvdp->vdp;
|
||||
VdpStatus vdp_st;
|
||||
|
||||
if (handle_preemption(ctx) < 0)
|
||||
@ -173,7 +173,7 @@ static int init(struct lavc_ctx *ctx)
|
||||
};
|
||||
ctx->hwdec_priv = p;
|
||||
|
||||
p->vdp = p->mpvdp->vdp;
|
||||
p->vdp = &p->mpvdp->vdp;
|
||||
p->context.render = p->vdp->decoder_render;
|
||||
|
||||
p->preemption_counter = p->mpvdp->preemption_counter;
|
||||
|
@ -75,7 +75,7 @@ static void destroy_objects(struct gl_hwdec *hw)
|
||||
{
|
||||
struct priv *p = hw->priv;
|
||||
GL *gl = hw->mpgl->gl;
|
||||
struct vdp_functions *vdp = p->ctx->vdp;
|
||||
struct vdp_functions *vdp = &p->ctx->vdp;
|
||||
VdpStatus vdp_st;
|
||||
|
||||
if (p->vdpgl_surface)
|
||||
@ -142,7 +142,7 @@ static int reinit(struct gl_hwdec *hw, const struct mp_image_params *params)
|
||||
{
|
||||
struct priv *p = hw->priv;
|
||||
GL *gl = hw->mpgl->gl;
|
||||
struct vdp_functions *vdp = p->ctx->vdp;
|
||||
struct vdp_functions *vdp = &p->ctx->vdp;
|
||||
VdpStatus vdp_st;
|
||||
|
||||
destroy_objects(hw);
|
||||
@ -215,7 +215,7 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image,
|
||||
{
|
||||
struct priv *p = hw->priv;
|
||||
GL *gl = hw->mpgl->gl;
|
||||
struct vdp_functions *vdp = p->ctx->vdp;
|
||||
struct vdp_functions *vdp = &p->ctx->vdp;
|
||||
VdpStatus vdp_st;
|
||||
|
||||
assert(hw_image && hw_image->imgfmt == IMGFMT_VDPAU);
|
||||
|
@ -1356,7 +1356,7 @@ static int preinit(struct vo *vo)
|
||||
|
||||
vc->preemption_counter = vc->mpvdp->preemption_counter;
|
||||
vc->vdp_device = vc->mpvdp->vdp_device;
|
||||
vc->vdp = vc->mpvdp->vdp;
|
||||
vc->vdp = &vc->mpvdp->vdp;
|
||||
|
||||
vc->colorspace = (struct mp_csp_details) MP_CSP_DETAILS_DEFAULTS;
|
||||
vc->video_eq.capabilities = MP_CSP_EQ_CAPS_COLORMATRIX;
|
||||
|
@ -86,7 +86,7 @@ static int win_x11_init_vdpau_procs(struct mp_vdpau_ctx *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
*ctx->vdp = vdp;
|
||||
ctx->vdp = vdp;
|
||||
ctx->get_proc_address = get_proc_address;
|
||||
|
||||
vdp_st = vdp.preemption_callback_register(ctx->vdp_device,
|
||||
@ -150,7 +150,7 @@ static struct mp_image *create_ref(struct surface_entry *e)
|
||||
struct mp_image *mp_vdpau_get_video_surface(struct mp_vdpau_ctx *ctx,
|
||||
VdpChromaType chroma, int w, int h)
|
||||
{
|
||||
struct vdp_functions *vdp = ctx->vdp;
|
||||
struct vdp_functions *vdp = &ctx->vdp;
|
||||
VdpStatus vdp_st;
|
||||
|
||||
// Destroy all unused surfaces that don't have matching parameters
|
||||
@ -205,14 +205,13 @@ struct mp_vdpau_ctx *mp_vdpau_create_device_x11(struct mp_log *log,
|
||||
*ctx = (struct mp_vdpau_ctx) {
|
||||
.log = log,
|
||||
.x11 = x11,
|
||||
.vdp = talloc_zero(ctx, struct vdp_functions),
|
||||
};
|
||||
|
||||
mark_vdpau_objects_uninitialized(ctx);
|
||||
|
||||
if (win_x11_init_vdpau_procs(ctx) < 0) {
|
||||
if (ctx->vdp->device_destroy)
|
||||
ctx->vdp->device_destroy(ctx->vdp_device);
|
||||
if (ctx->vdp.device_destroy)
|
||||
ctx->vdp.device_destroy(ctx->vdp_device);
|
||||
talloc_free(ctx);
|
||||
return NULL;
|
||||
}
|
||||
@ -221,7 +220,7 @@ struct mp_vdpau_ctx *mp_vdpau_create_device_x11(struct mp_log *log,
|
||||
|
||||
void mp_vdpau_destroy(struct mp_vdpau_ctx *ctx)
|
||||
{
|
||||
struct vdp_functions *vdp = ctx->vdp;
|
||||
struct vdp_functions *vdp = &ctx->vdp;
|
||||
VdpStatus vdp_st;
|
||||
|
||||
for (int i = 0; i < MAX_VIDEO_SURFACES; i++) {
|
||||
|
@ -35,7 +35,7 @@ struct vdp_functions {
|
||||
// Shared state. Objects created from different VdpDevices are often (always?)
|
||||
// incompatible to each other, so all code must use a shared VdpDevice.
|
||||
struct mp_vdpau_ctx {
|
||||
struct vdp_functions *vdp;
|
||||
struct vdp_functions vdp;
|
||||
VdpGetProcAddress *get_proc_address;
|
||||
VdpDevice vdp_device;
|
||||
bool is_preempted; // set to true during unavailability
|
||||
|
Loading…
Reference in New Issue
Block a user