[vlc-devel] [PATCH 3/4] libvlc: add sdl_opengl_player sample

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Jul 11 10:32:26 CEST 2018


On Wed, Jul 11, 2018, at 4:18 AM, Zhao Zhili wrote:
> 
> 
> > On Jul 3, 2018, at 8:38 PM, Pierre Lamot <pierre at videolabs.io> wrote:
> > 
> > +    static void create_fbo(void* data, size_t width, size_t height)
> > +    {
> > +        VLCVideo* that = reinterpret_cast<VLCVideo*>(data);
> 
> Maybe I'm wrong, I think static_cast is better for this case.
> 

As far as I can see, reinterpret_cast conversion from void* to another pointer type is not explicitly defined, while the void* -> other pointer is, so I believe you are correct.
And I'm actually pretty sure I've been advocating the opposite for quite some time now, so... oops :(

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list