Commit 652977b1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

vdpau: remove unwarranted assumption on C calling convention

parent 7bc42a59
......@@ -109,37 +109,40 @@ struct vdp_s
void *handle; /**< Shared library handle */
};
#define CHECK_FUNC(id) \
if (unlikely(vdp->funcs[VDP_FUNC_ID_##id] == NULL)) \
return VDP_STATUS_NO_IMPLEMENTATION
const char *vdp_get_error_string(const vdp_t *vdp, VdpStatus status)
{
if (unlikely(vdp->funcs[VDP_FUNC_ID_GET_ERROR_STRING] == NULL))
return (status != VDP_STATUS_OK) ? "Unknown error" : "No error";
return vdp->vt.get_error_string(status);
}
static const char *vdp_get_error_string_fallback(const vdp_t *vdp,
VdpStatus status)
{
(void) vdp;
return (status != VDP_STATUS_OK) ? "Unknown error" : "No error";
}
VdpStatus vdp_get_proc_address(const vdp_t *vdp, VdpDevice device,
VdpFuncId func_id, void **func_ptr)
{
CHECK_FUNC(GET_PROC_ADDRESS);
return vdp->vt.get_proc_address(device, func_id, func_ptr);
}
VdpStatus vdp_get_api_version(const vdp_t *vdp, uint32_t *ver)
{
CHECK_FUNC(GET_API_VERSION);
return vdp->vt.get_api_version(ver);
}
VdpStatus vdp_get_information_string(const vdp_t *vdp, const char **str)
{
CHECK_FUNC(GET_INFORMATION_STRING);
return vdp->vt.get_information_string(str);
}
/*** Device ***/
VdpStatus vdp_device_destroy(const vdp_t *vdp, VdpDevice device)
{
CHECK_FUNC(DEVICE_DESTROY);
return vdp->vt.device_destroy(device);
}
......@@ -153,6 +156,7 @@ VdpStatus vdp_generate_csc_matrix(const vdp_t *vdp, const VdpProcamp *procamp,
buf = *procamp;
copy = &buf;
}
CHECK_FUNC(GENERATE_CSC_MATRIX);
return vdp->vt.generate_csc_matrix(copy, standard, csc_matrix);
}
......@@ -160,6 +164,7 @@ VdpStatus vdp_generate_csc_matrix(const vdp_t *vdp, const VdpProcamp *procamp,
VdpStatus vdp_video_surface_query_capabilities(const vdp_t *vdp, VdpDevice dev,
VdpChromaType type, VdpBool *ok, uint32_t *mw, uint32_t *mh)
{
CHECK_FUNC(VIDEO_SURFACE_QUERY_CAPABILITIES);
return vdp->vt.video_surface_query_capabilities(dev, type, ok, mw, mh);
}
......@@ -167,6 +172,7 @@ VdpStatus vdp_video_surface_query_get_put_bits_y_cb_cr_capabilities(
const vdp_t *vdp, VdpDevice device, VdpChromaType type, VdpYCbCrFormat fmt,
VdpBool *ok)
{
CHECK_FUNC(VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES);
return vdp->vt.video_surface_query_get_put_bits_y_cb_cr_capabilities(
device, type, fmt, ok);
}
......@@ -174,17 +180,20 @@ VdpStatus vdp_video_surface_query_get_put_bits_y_cb_cr_capabilities(
VdpStatus vdp_video_surface_create(const vdp_t *vdp, VdpDevice device,
VdpChromaType chroma, uint32_t w, uint32_t h, VdpVideoSurface *surface)
{
CHECK_FUNC(VIDEO_SURFACE_CREATE);
return vdp->vt.video_surface_create(device, chroma, w, h, surface);
}
VdpStatus vdp_video_surface_destroy(const vdp_t *vdp, VdpVideoSurface surface)
{
CHECK_FUNC(VIDEO_SURFACE_DESTROY);
return vdp->vt.video_surface_destroy(surface);
}
VdpStatus vdp_video_surface_get_parameters(const vdp_t *vdp,
VdpVideoSurface surface, VdpChromaType *type, uint32_t *w, uint32_t *h)
{
CHECK_FUNC(VIDEO_SURFACE_GET_PARAMETERS);
return vdp->vt.video_surface_get_parameters(surface, type, w, h);
}
......@@ -192,6 +201,7 @@ VdpStatus vdp_video_surface_get_bits_y_cb_cr(const vdp_t *vdp,
VdpVideoSurface surface, VdpYCbCrFormat fmt,
void *const *data, uint32_t const *pitches)
{
CHECK_FUNC(VIDEO_SURFACE_GET_BITS_Y_CB_CR);
return vdp->vt.video_surface_get_bits_y_cb_cr(surface, fmt, data, pitches);
}
......@@ -199,6 +209,7 @@ VdpStatus vdp_video_surface_put_bits_y_cb_cr(const vdp_t *vdp,
VdpVideoSurface surface, VdpYCbCrFormat fmt,
const void *const *data, uint32_t const *pitches)
{
CHECK_FUNC(VIDEO_SURFACE_PUT_BITS_Y_CB_CR);
return vdp->vt.video_surface_put_bits_y_cb_cr(surface, fmt, data, pitches);
}
......@@ -207,6 +218,7 @@ VdpStatus vdp_output_surface_query_capabilities(const vdp_t *vdp,
VdpDevice device, VdpRGBAFormat fmt, VdpBool *ok,
uint32_t *max_width, uint32_t *max_height)
{
CHECK_FUNC(OUTPUT_SURFACE_QUERY_CAPABILITIES);
return vdp->vt.output_surface_query_capabilities(device, fmt, ok,
max_width, max_height);
}
......@@ -214,6 +226,7 @@ VdpStatus vdp_output_surface_query_capabilities(const vdp_t *vdp,
VdpStatus vdp_output_surface_query_get_put_bits_native_capabilities(
const vdp_t *vdp, VdpDevice device, VdpRGBAFormat fmt, VdpBool *ok)
{
CHECK_FUNC(OUTPUT_SURFACE_QUERY_GET_PUT_BITS_NATIVE_CAPABILITIES);
return vdp->vt.output_surface_query_get_put_bits_native_capabilities(
device, fmt, ok);
}
......@@ -222,6 +235,7 @@ VdpStatus vdp_output_surface_query_put_bits_indexed_capabilities(
const vdp_t *vdp, VdpDevice device, VdpRGBAFormat fmt,
VdpIndexedFormat idxfmt, VdpColorTableFormat colfmt, VdpBool *ok)
{
CHECK_FUNC(OUTPUT_SURFACE_QUERY_PUT_BITS_INDEXED_CAPABILITIES);
return vdp->vt.output_surface_query_put_bits_indexed_capabilities(device,
fmt, idxfmt, colfmt, ok);
}
......@@ -230,6 +244,7 @@ VdpStatus vdp_output_surface_query_put_bits_y_cb_cr_capabilities(
const vdp_t *vdp, VdpDevice device,
VdpRGBAFormat fmt, VdpYCbCrFormat yccfmt, VdpBool *ok)
{
CHECK_FUNC(OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES);
return vdp->vt.output_surface_query_put_bits_y_cb_cr_capabilities(device,
fmt, yccfmt, ok);
}
......@@ -237,18 +252,21 @@ VdpStatus vdp_output_surface_query_put_bits_y_cb_cr_capabilities(
VdpStatus vdp_output_surface_create(const vdp_t *vdp, VdpDevice device,
VdpRGBAFormat fmt, uint32_t w, uint32_t h, VdpOutputSurface *surface)
{
CHECK_FUNC(OUTPUT_SURFACE_CREATE);
return vdp->vt.output_surface_create(device, fmt, w, h, surface);
}
VdpStatus vdp_output_surface_destroy(const vdp_t *vdp,
VdpOutputSurface surface)
{
CHECK_FUNC(OUTPUT_SURFACE_DESTROY);
return vdp->vt.output_surface_destroy(surface);
}
VdpStatus vdp_output_surface_get_parameters(const vdp_t *vdp,
VdpOutputSurface surface, VdpRGBAFormat *fmt, uint32_t *w, uint32_t *h)
{
CHECK_FUNC(OUTPUT_SURFACE_GET_PARAMETERS);
return vdp->vt.output_surface_get_parameters(surface, fmt, w, h);
}
......@@ -256,6 +274,7 @@ VdpStatus vdp_output_surface_get_bits_native(const vdp_t *vdp,
VdpOutputSurface surface, const VdpRect *src,
void *const *data, uint32_t const *pitches)
{
CHECK_FUNC(OUTPUT_SURFACE_GET_BITS_NATIVE);
return vdp->vt.output_surface_get_bits_native(surface, src, data, pitches);
}
......@@ -263,6 +282,7 @@ VdpStatus vdp_output_surface_put_bits_native(const vdp_t *vdp,
VdpOutputSurface surface, const void *const *data, uint32_t const *pitches,
const VdpRect *dst)
{
CHECK_FUNC(OUTPUT_SURFACE_PUT_BITS_NATIVE);
return vdp->vt.output_surface_put_bits_native(surface, data, pitches, dst);
}
......@@ -271,6 +291,7 @@ VdpStatus vdp_output_surface_put_bits_indexed(const vdp_t *vdp,
const uint32_t *pitch, const VdpRect *dst,
VdpColorTableFormat tabfmt, const void *tab)
{
CHECK_FUNC(OUTPUT_SURFACE_PUT_BITS_INDEXED);
return vdp->vt.output_surface_put_bits_indexed(surface, fmt, data, pitch,
dst, tabfmt, tab);
}
......@@ -279,6 +300,7 @@ VdpStatus vdp_output_surface_put_bits_y_cb_cr(const vdp_t *vdp,
VdpOutputSurface surface, VdpYCbCrFormat fmt, const void *const *data,
const uint32_t *pitches, const VdpRect *dst, const VdpCSCMatrix *mtx)
{
CHECK_FUNC(OUTPUT_SURFACE_PUT_BITS_Y_CB_CR);
return vdp->vt.output_surface_put_bits_y_cb_cr(surface, fmt, data,
pitches, dst, mtx);
}
......@@ -287,6 +309,7 @@ VdpStatus vdp_output_surface_put_bits_y_cb_cr(const vdp_t *vdp,
VdpStatus vdp_bitmap_surface_query_capabilities(const vdp_t *vdp,
VdpDevice device, VdpRGBAFormat fmt, VdpBool *ok, uint32_t *w, uint32_t *h)
{
CHECK_FUNC(BITMAP_SURFACE_QUERY_CAPABILITIES);
return vdp->vt.bitmap_surface_query_capabilities(device, fmt, ok, w, h);
}
......@@ -294,12 +317,14 @@ VdpStatus vdp_bitmap_surface_create(const vdp_t *vdp, VdpDevice device,
VdpRGBAFormat fmt, uint32_t w, uint32_t h, VdpBool fq,
VdpBitmapSurface *surface)
{
CHECK_FUNC(BITMAP_SURFACE_CREATE);
return vdp->vt.bitmap_surface_create(device, fmt, w, h, fq, surface);
}
VdpStatus vdp_bitmap_surface_destroy(const vdp_t *vdp,
VdpBitmapSurface surface)
{
CHECK_FUNC(BITMAP_SURFACE_DESTROY);
return vdp->vt.bitmap_surface_destroy(surface);
}
......@@ -307,6 +332,7 @@ VdpStatus vdp_bitmap_surface_get_parameters(const vdp_t *vdp,
VdpBitmapSurface surface, VdpRGBAFormat *fmt, uint32_t *w, uint32_t *h,
VdpBool *fq)
{
CHECK_FUNC(BITMAP_SURFACE_GET_PARAMETERS);
return vdp->vt.bitmap_surface_get_parameters(surface, fmt, w, h, fq);
}
......@@ -314,6 +340,7 @@ VdpStatus vdp_bitmap_surface_put_bits_native(const vdp_t *vdp,
VdpBitmapSurface surface, const void *const *data, const uint32_t *pitch,
const VdpRect *rect)
{
CHECK_FUNC(BITMAP_SURFACE_PUT_BITS_NATIVE);
return vdp->vt.bitmap_surface_put_bits_native(surface, data, pitch, rect);
}
......@@ -323,6 +350,7 @@ VdpStatus vdp_output_surface_render_output_surface(const vdp_t *vdp,
const VdpColor *colors,
const VdpOutputSurfaceRenderBlendState *const state, uint32_t flags)
{
CHECK_FUNC(OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE);
return vdp->vt.output_surface_render_output_surface(dst_surface, dst_rect,
src_surface, src_rect, colors, state, flags);
}
......@@ -333,6 +361,7 @@ VdpStatus vdp_output_surface_render_bitmap_surface(const vdp_t *vdp,
const VdpColor *colors,
const VdpOutputSurfaceRenderBlendState *state, uint32_t flags)
{
CHECK_FUNC(OUTPUT_SURFACE_RENDER_BITMAP_SURFACE);
return vdp->vt.output_surface_render_bitmap_surface(dst_surface, dst_rect,
src_surface, src_rect, colors, state, flags);
}
......@@ -342,6 +371,7 @@ VdpStatus vdp_decoder_query_capabilities(const vdp_t *vdp, VdpDevice device,
VdpDecoderProfile profile, VdpBool *ok, uint32_t *l, uint32_t *m,
uint32_t *w, uint32_t *h)
{
CHECK_FUNC(DECODER_QUERY_CAPABILITIES);
return vdp->vt.decoder_query_capabilities(device, profile, ok, l, m, w, h);
}
......@@ -349,25 +379,28 @@ VdpStatus vdp_decoder_create(const vdp_t *vdp, VdpDevice device,
VdpDecoderProfile profile, uint32_t w, uint32_t h, uint32_t refs,
VdpDecoder *decoder)
{
CHECK_FUNC(DECODER_CREATE);
return vdp->vt.decoder_create(device, profile, w, h, refs, decoder);
}
VdpStatus vdp_decoder_destroy(const vdp_t *vdp, VdpDecoder decoder)
{
CHECK_FUNC(DECODER_DESTROY);
return vdp->vt.decoder_destroy(decoder);
}
VdpStatus vdp_decoder_get_parameters(const vdp_t *vdp, VdpDecoder decoder,
VdpDecoderProfile *profile, uint32_t *w, uint32_t *h)
{
CHECK_FUNC(DECODER_GET_PARAMETERS);
return vdp->vt.decoder_get_parameters(decoder, profile, w, h);
}
VdpStatus vdp_decoder_render(const vdp_t *vdp, VdpDecoder decoder,
VdpVideoSurface target, const VdpPictureInfo *info,
uint32_t bufv, const VdpBitstreamBuffer *bufc)
{
CHECK_FUNC(DECODER_RENDER);
return vdp->vt.decoder_render(decoder, target, info, bufv, bufc);
}
......@@ -375,24 +408,28 @@ VdpStatus vdp_decoder_render(const vdp_t *vdp, VdpDecoder decoder,
VdpStatus vdp_video_mixer_query_feature_support(const vdp_t *vdp,
VdpDevice device, VdpVideoMixerFeature feature, VdpBool *ok)
{
CHECK_FUNC(VIDEO_MIXER_QUERY_FEATURE_SUPPORT);
return vdp->vt.video_mixer_query_feature_support(device, feature, ok);
}
VdpStatus vdp_video_mixer_query_parameter_support(const vdp_t *vdp,
VdpDevice device, VdpVideoMixerParameter parameter, VdpBool *ok)
{
CHECK_FUNC(VIDEO_MIXER_QUERY_PARAMETER_SUPPORT);
return vdp->vt.video_mixer_query_parameter_support(device, parameter, ok);
}
VdpStatus vdp_video_mixer_query_attribute_support(const vdp_t *vdp,
VdpDevice device, VdpVideoMixerAttribute attribute, VdpBool *ok)
{
CHECK_FUNC(VIDEO_MIXER_QUERY_ATTRIBUTE_SUPPORT);
return vdp->vt.video_mixer_query_attribute_support(device, attribute, ok);
}
VdpStatus vdp_video_mixer_query_parameter_value_range(const vdp_t *vdp,
VdpDevice device, VdpVideoMixerParameter parameter, void *min, void *max)
{
CHECK_FUNC(VIDEO_MIXER_QUERY_PARAMETER_VALUE_RANGE);
return vdp->vt.video_mixer_query_parameter_value_range(device, parameter,
min, max);
}
......@@ -400,6 +437,7 @@ VdpStatus vdp_video_mixer_query_parameter_value_range(const vdp_t *vdp,
VdpStatus vdp_video_mixer_query_attribute_value_range(const vdp_t *vdp,
VdpDevice device, VdpVideoMixerAttribute attribute, void *min, void *max)
{
CHECK_FUNC(VIDEO_MIXER_QUERY_ATTRIBUTE_VALUE_RANGE);
return vdp->vt.video_mixer_query_attribute_value_range(device, attribute,
min, max);
}
......@@ -409,6 +447,7 @@ VdpStatus vdp_video_mixer_create(const vdp_t *vdp, VdpDevice device,
uint32_t parmc, const VdpVideoMixerParameter *parmv,
const void *const *parmvalv, VdpVideoMixer *mixer)
{
CHECK_FUNC(VIDEO_MIXER_CREATE);
return vdp->vt.video_mixer_create(device, featc, featv, parmc, parmv,
parmvalv, mixer);
}
......@@ -417,6 +456,7 @@ VdpStatus vdp_video_mixer_set_feature_enables(const vdp_t *vdp,
VdpVideoMixer mixer, uint32_t count, const VdpVideoMixerFeature *ids,
const VdpBool *values)
{
CHECK_FUNC(VIDEO_MIXER_SET_FEATURE_ENABLES);
return vdp->vt.video_mixer_set_feature_enables(mixer, count, ids, values);
}
......@@ -424,6 +464,7 @@ VdpStatus vdp_video_mixer_set_attribute_values(const vdp_t *vdp,
VdpVideoMixer mixer, uint32_t count,
const VdpVideoMixerAttribute *const ids, const void *const *values)
{
CHECK_FUNC(VIDEO_MIXER_SET_ATTRIBUTE_VALUES);
return vdp->vt.video_mixer_set_attribute_values(mixer, count, ids, values);
}
......@@ -431,6 +472,7 @@ VdpStatus vdp_video_mixer_get_feature_support(const vdp_t *vdp,
VdpVideoMixer mixer, uint32_t count, const VdpVideoMixerFeature *ids,
VdpBool *values)
{
CHECK_FUNC(VIDEO_MIXER_GET_FEATURE_SUPPORT);
return vdp->vt.video_mixer_get_feature_support(mixer, count, ids, values);
}
......@@ -438,6 +480,7 @@ VdpStatus vdp_video_mixer_get_feature_enables(const vdp_t *vdp,
VdpVideoMixer mixer, uint32_t count, const VdpVideoMixerFeature *ids,
VdpBool *values)
{
CHECK_FUNC(VIDEO_MIXER_GET_FEATURE_ENABLES);
return vdp->vt.video_mixer_get_feature_enables(mixer, count, ids, values);
}
......@@ -445,6 +488,7 @@ VdpStatus vdp_video_mixer_get_parameter_values(const vdp_t *vdp,
VdpVideoMixer mixer, uint32_t count, const VdpVideoMixerParameter *ids,
void *const *values)
{
CHECK_FUNC(VIDEO_MIXER_GET_PARAMETER_VALUES);
return vdp->vt.video_mixer_get_parameter_values(mixer, count, ids, values);
}
......@@ -452,11 +496,13 @@ VdpStatus vdp_video_mixer_get_attribute_values(const vdp_t *vdp,
VdpVideoMixer mixer, uint32_t count, const VdpVideoMixerAttribute *ids,
void *const *values)
{
CHECK_FUNC(VIDEO_MIXER_GET_ATTRIBUTE_VALUES);
return vdp->vt.video_mixer_get_attribute_values(mixer, count, ids, values);
}
VdpStatus vdp_video_mixer_destroy(const vdp_t *vdp, VdpVideoMixer mixer)
{
CHECK_FUNC(VIDEO_MIXER_DESTROY);
return vdp->vt.video_mixer_destroy(mixer);
}
......@@ -468,6 +514,7 @@ VdpStatus vdp_video_mixer_render(const vdp_t *vdp, VdpVideoMixer mixer,
VdpOutputSurface dst, const VdpRect *dst_rect, const VdpRect *dst_v_rect,
uint32_t layerc, const VdpLayer *layerv)
{
CHECK_FUNC(VIDEO_MIXER_RENDER);
return vdp->vt.video_mixer_render(mixer, bgsurface, bgrect, pic_struct,
prev_count, prev, cur, next_count, next, src_rect, dst, dst_rect,
dst_v_rect, layerc, layerv);
......@@ -477,18 +524,21 @@ VdpStatus vdp_video_mixer_render(const vdp_t *vdp, VdpVideoMixer mixer,
VdpStatus vdp_presentation_queue_target_destroy(const vdp_t *vdp,
VdpPresentationQueueTarget target)
{
CHECK_FUNC(PRESENTATION_QUEUE_TARGET_DESTROY);
return vdp->vt.presentation_queue_target_destroy(target);
}
VdpStatus vdp_presentation_queue_create(const vdp_t *vdp, VdpDevice device,
VdpPresentationQueueTarget target, VdpPresentationQueue *queue)
{
CHECK_FUNC(PRESENTATION_QUEUE_CREATE);
return vdp->vt.presentation_queue_create(device, target, queue);
}
VdpStatus vdp_presentation_queue_destroy(const vdp_t *vdp,
VdpPresentationQueue queue)
{
CHECK_FUNC(PRESENTATION_QUEUE_DESTROY);
return vdp->vt.presentation_queue_destroy(queue);
}
......@@ -496,18 +546,21 @@ VdpStatus vdp_presentation_queue_set_background_color(const vdp_t *vdp,
VdpPresentationQueue queue, const VdpColor *color)
{
VdpColor bak = *color;
CHECK_FUNC(PRESENTATION_QUEUE_SET_BACKGROUND_COLOR);
return vdp->vt.presentation_queue_set_background_color(queue, &bak);
}
VdpStatus vdp_presentation_queue_get_background_color(const vdp_t *vdp,
VdpPresentationQueue queue, VdpColor *color)
{
CHECK_FUNC(PRESENTATION_QUEUE_GET_BACKGROUND_COLOR);
return vdp->vt.presentation_queue_get_background_color(queue, color);
}
VdpStatus vdp_presentation_queue_get_time(const vdp_t *vdp,
VdpPresentationQueue queue, VdpTime *current_time)
{
CHECK_FUNC(PRESENTATION_QUEUE_GET_TIME);
return vdp->vt.presentation_queue_get_time(queue, current_time);
}
......@@ -515,6 +568,7 @@ VdpStatus vdp_presentation_queue_display(const vdp_t *vdp,
VdpPresentationQueue queue, VdpOutputSurface surface, uint32_t clip_width,
uint32_t clip_height, VdpTime pts)
{
CHECK_FUNC(PRESENTATION_QUEUE_DISPLAY);
return vdp->vt.presentation_queue_display(queue, surface, clip_width,
clip_height, pts);
}
......@@ -522,6 +576,7 @@ VdpStatus vdp_presentation_queue_display(const vdp_t *vdp,
VdpStatus vdp_presentation_queue_block_until_surface_idle(const vdp_t *vdp,
VdpPresentationQueue queue, VdpOutputSurface surface, VdpTime *pts)
{
CHECK_FUNC(PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE);
return vdp->vt.presentation_queue_block_until_surface_idle(queue, surface,
pts);
}
......@@ -530,6 +585,7 @@ VdpStatus vdp_presentation_queue_query_surface_status(const vdp_t *vdp,
VdpPresentationQueue queue, VdpOutputSurface surface,
VdpPresentationQueueStatus *status, VdpTime *pts)
{
CHECK_FUNC(PRESENTATION_QUEUE_QUERY_SURFACE_STATUS);
return vdp->vt.presentation_queue_query_surface_status(queue, surface,
status, pts);
}
......@@ -538,14 +594,10 @@ VdpStatus vdp_presentation_queue_query_surface_status(const vdp_t *vdp,
VdpStatus vdp_preemption_callback_register(const vdp_t *vdp, VdpDevice device,
VdpPreemptionCallback cb, void *ctx)
{
CHECK_FUNC(PREEMPTION_CALLBACK_REGISTER);
return vdp->vt.preemption_callback_register(device, cb, ctx);
}
static VdpStatus vdp_fallback(/* UNDEFINED - LEAVE EMPTY */)
{
return VDP_STATUS_NO_IMPLEMENTATION;
}
/*** X11 & VLC ***/
#include <dlfcn.h>
#include <vdpau/vdpau_x11.h>
......@@ -591,12 +643,7 @@ VdpStatus vdp_create_x11(void *dpy, int snum,
for (VdpFuncId i = 0; i < sizeof (vdp->vt) / sizeof (void *); i++)
if (gpa(*devp, i, vdp->funcs + i) != VDP_STATUS_OK)
{
void *fallback = vdp_fallback;
if (unlikely(i == VDP_FUNC_ID_GET_ERROR_STRING))
fallback = vdp_get_error_string_fallback;
vdp->funcs[i] = fallback;
}
vdp->funcs[i] = NULL;
return VDP_STATUS_OK;
error:
......
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