[vlc-devel] [PATCH 05/27] opengl: store video format in sampler

Alexandre Janniaux ajanni at videolabs.io
Mon Jun 29 16:12:57 CEST 2020


Hi,

Can you signal it with an assert on p_palette and a comment
then ?

Regards,
--
Alexandre Janniaux
Videolabs

On Mon, Jun 29, 2020 at 04:05:23PM +0200, Romain Vimont wrote:
> On Mon, Jun 29, 2020 at 03:49:36PM +0200, Alexandre Janniaux wrote:
> > Hi,
> >
> > On Thu, Jun 25, 2020 at 02:22:52PM +0200, Romain Vimont wrote:
> > This doesn't look like a correct video_format copy.
>
> The line below, I set p_palette to NULL because we don't use it. But
> yes, it's hacky.
>
> It was to avoid video_format_Copy() (which imposes error handling).
>
> >
> > > +    /* this is the only allocated field, and we don't need it */
> > > +    sampler->fmt.p_palette = NULL;
> > >
> > >      sampler->shader.extensions = NULL;
> > >      sampler->shader.body = NULL;
> > > diff --git a/modules/video_output/opengl/sampler.h b/modules/video_output/opengl/sampler.h
> > > index b8439b004b..c3ddfd7204 100644
> > > --- a/modules/video_output/opengl/sampler.h
> > > +++ b/modules/video_output/opengl/sampler.h
> > > @@ -51,7 +51,7 @@
> > >   */
> > >  struct vlc_gl_sampler {
> > >      /* Input format */
> > > -    const video_format_t *fmt;
> > > +    video_format_t fmt;
> > >
> > >      struct {
> > >          /**
> > > --
> > > 2.27.0
> > >
> > > _______________________________________________
> > > vlc-devel mailing list
> > > To unsubscribe or modify your subscription options:
> > > https://mailman.videolan.org/listinfo/vlc-devel
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list