[VDPAU] [PATCH] Fix incorrect VdpDecoderRender signature.

Stephen Warren swarren at nvidia.com
Tue Feb 18 08:42:09 PST 2014


Reimar Döffinger wrote at Sunday, February 16, 2014 12:14 PM:
> VdpPictureInfo is already a pointer to e.g. a VdpPictureInfoH264,
> and that is what the function expects, it does not expect
> a pointer to a pointer as the signature claims.
> This also requires a new typedef to keep the const attribute.

Good catch, but ...

> diff --git a/include/vdpau/vdpau.h b/include/vdpau/vdpau.h

>  typedef void * VdpPictureInfo;
> +typedef const void * ConstVdpPictureInfo;

I think this would be better served by the following:

- typedef void * VdpPictureInfo;
+ typedef struct VdpPictureInfo VdpPictureInfo;

> @@ -3017,7 +3018,7 @@ typedef VdpPictureInfoMPEG4Part2 VdpPictureInfoDivX5;
>  typedef VdpStatus VdpDecoderRender(
>      VdpDecoder                 decoder,
>      VdpVideoSurface            target,
> -    VdpPictureInfo const *     picture_info,
> +    ConstVdpPictureInfo        picture_info,

... and dropping that change. 

That way, all of VdpPictureInfo (the generic version) and VdpPictureInfo*
(the various concrete structures) are all structs, rather than the generic
version being a pointer instead.

-- 
nvpublic



More information about the VDPAU mailing list