Commit 63ae28a0 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

vdpau: reorder

No functional changes.
parent 260fca12
......@@ -56,6 +56,23 @@ static void SurfaceDestroy(struct picture_context_t *ctx)
free(frame);
}
vlc_vdp_video_field_t *vlc_vdp_video_copy(vlc_vdp_video_field_t *fold)
{
vlc_vdp_video_frame_t *frame = fold->frame;
vlc_vdp_video_field_t *fnew = malloc(sizeof (*fnew));
if (unlikely(fnew == NULL))
return NULL;
fnew->context.destroy = SurfaceDestroy;
fnew->frame = frame;
fnew->structure = fold->structure;
fnew->procamp = fold->procamp;
fnew->sharpen = fold->sharpen;
atomic_fetch_add(&frame->refs, 1);
return fnew;
}
static const VdpProcamp procamp_default =
{
.struct_version = VDP_PROCAMP_VERSION,
......@@ -105,20 +122,3 @@ VdpStatus vlc_vdp_video_attach(vdp_t *vdp, VdpVideoSurface surface,
pic->context = &field->context;
return VDP_STATUS_OK;
}
vlc_vdp_video_field_t *vlc_vdp_video_copy(vlc_vdp_video_field_t *fold)
{
vlc_vdp_video_frame_t *frame = fold->frame;
vlc_vdp_video_field_t *fnew = malloc(sizeof (*fnew));
if (unlikely(fnew == NULL))
return NULL;
fnew->context.destroy = SurfaceDestroy;
fnew->frame = frame;
fnew->structure = fold->structure;
fnew->procamp = fold->procamp;
fnew->sharpen = fold->sharpen;
atomic_fetch_add(&frame->refs, 1);
return fnew;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment