summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-03-19 19:57:08 +0100
committerwm4 <wm4@nowhere>2014-03-19 19:57:08 +0100
commit9be93d6b60bebe6b43687d481957ed78ac25f4c8 (patch)
treebd131d3415b3121d0c62c3a7b514355574c0e0ad /video
parent917650fefaa34b94a3784c2944c45b5d7131f229 (diff)
downloadmpv-9be93d6b60bebe6b43687d481957ed78ac25f4c8.tar.bz2
mpv-9be93d6b60bebe6b43687d481957ed78ac25f4c8.tar.xz
vdpau: remove pointer indirection for a field
There's no reason to. This is basically a cosmetic change.
Diffstat (limited to 'video')
-rw-r--r--video/decode/vdpau.c6
-rw-r--r--video/out/gl_hwdec_vdpau.c6
-rw-r--r--video/out/vo_vdpau.c2
-rw-r--r--video/vdpau.c11
-rw-r--r--video/vdpau.h2
5 files changed, 13 insertions, 14 deletions
diff --git a/video/decode/vdpau.c b/video/decode/vdpau.c
index 46b6295030..e494fedd55 100644
--- a/video/decode/vdpau.c
+++ b/video/decode/vdpau.c
@@ -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;
diff --git a/video/out/gl_hwdec_vdpau.c b/video/out/gl_hwdec_vdpau.c
index 07e406d9ba..d5d3b30b52 100644
--- a/video/out/gl_hwdec_vdpau.c
+++ b/video/out/gl_hwdec_vdpau.c
@@ -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);
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index 9822063892..abb99d6ead 100644
--- a/video/out/vo_vdpau.c
+++ b/video/out/vo_vdpau.c
@@ -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;
diff --git a/video/vdpau.c b/video/vdpau.c
index cd6af07cb9..a53986c36e 100644
--- a/video/vdpau.c
+++ b/video/vdpau.c
@@ -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++) {
diff --git a/video/vdpau.h b/video/vdpau.h
index 24615529d2..1b81062bb7 100644
--- a/video/vdpau.h
+++ b/video/vdpau.h
@@ -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