mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-03 01:31:53 +02:00
vdpau: frames need not hold the instance
Frames (video surfaces) are always held by one of more fields. Fields already hold the video context, which holds the decoder device, which holds the instance. So frames can rely on any one of their referencing fields to hold the video context.
This commit is contained in:
parent
29f94a7174
commit
7c097becf1
@ -54,7 +54,6 @@ static void VideoSurfaceDestroy(struct picture_context_t *ctx)
|
||||
if (err != VDP_STATUS_OK)
|
||||
fprintf(stderr, "video surface destruction failure: %s\n",
|
||||
vdp_get_error_string(frame->vdp, err));
|
||||
vdp_release_x11(frame->vdp);
|
||||
free(frame);
|
||||
}
|
||||
|
||||
@ -107,7 +106,8 @@ vlc_vdp_video_field_t *vlc_vdp_video_create(struct vlc_video_context *vctx,
|
||||
|
||||
atomic_init(&frame->refs, 1);
|
||||
frame->surface = surface;
|
||||
frame->vdp = vdp_hold_x11(device->vdp, &frame->device);
|
||||
frame->vdp = device->vdp;
|
||||
frame->device = device->device;
|
||||
return field;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user