summaryrefslogtreecommitdiffstats
path: root/video/decode/vdpau_old.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-08-15 18:21:54 +0200
committerwm4 <wm4@nowhere>2013-08-15 23:40:02 +0200
commit006c2f66e109099d1956594234f54a5f3b5f0ec5 (patch)
tree81da41f627772ec9181e5132c5c410a901ecf78f /video/decode/vdpau_old.c
parentbe2f2ff033620b31fe04cf53f2b745ebfb2e0ffc (diff)
downloadmpv-006c2f66e109099d1956594234f54a5f3b5f0ec5.tar.bz2
mpv-006c2f66e109099d1956594234f54a5f3b5f0ec5.tar.xz
video/decode: change fix_image callback
This might make it slightly easier when trying to implement surface read-back for hardware decoding.
Diffstat (limited to 'video/decode/vdpau_old.c')
-rw-r--r--video/decode/vdpau_old.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/video/decode/vdpau_old.c b/video/decode/vdpau_old.c
index b5674dcec0..8490caedeb 100644
--- a/video/decode/vdpau_old.c
+++ b/video/decode/vdpau_old.c
@@ -247,12 +247,13 @@ static int probe(struct vd_lavc_hwdec *hwdec, struct mp_hwdec_info *info,
return 0;
}
-static void fix_image(struct lavc_ctx *ctx, struct mp_image *img)
+static struct mp_image *process_image(struct lavc_ctx *ctx, struct mp_image *img)
{
// Make it follow the convention of the "new" vdpau decoder
struct vdpau_render_state *rndr = (void *)img->planes[0];
img->planes[0] = (void *)"dummy"; // must be non-NULL, otherwise arbitrary
img->planes[3] = (void *)(intptr_t)rndr->surface;
+ return img;
}
const struct vd_lavc_hwdec mp_vd_lavc_vdpau_old = {
@@ -275,5 +276,5 @@ const struct vd_lavc_hwdec mp_vd_lavc_vdpau_old = {
.init = init,
.uninit = uninit,
.allocate_image = allocate_image,
- .fix_image = fix_image,
+ .process_image = process_image,
};