Le samedi 12 janvier 2013 11:17:08, Diego Biurrun a écrit :
> > > > --- a/libavcodec/vdpau_internal.h
> > > > +++ b/libavcodec/vdpau_internal.h
> > > > @@ -25,8 +25,23 @@
> > > > 
> > > > +/** Extract VdpVideoSurface from a Picture */
> > > > +static inline VdpVideoSurface ff_vdpau_get_surface_id(Picture *pic)
> > > > +{
> > > > +    return (uintptr_t)pic->f.data[3];
> > > > +}
> > > 
> > > uintptr_t vs. VdpVideoSurface - I'm confused ...
> > 
> > GCC will bitch if casting a pointer to an integer of smaller entropy.
> > Note that VdpVideoSurface is an unsigned 32-bits descriptor, as is
> > typical of X11 resources.
> > 
> > Do you really want this instead?
> > 
> >     return (VdpVideoSurface)(uintptr_t)pic->f.data[3];
> 
> No.

Then I can only think of two possibilities:
1/ Pass VdpVideoSurface as data[3], keep the ugly (u)intptr_t cast as is.
2/ Pass VdpVideoSurface * as data[3].

-- 
Rémi Denis-Courmont
http://www.remlab.net/
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to