[vlc-devel] [PATCH] picture: fix missing video_format_t attributes from the picture

Filip Roséen filip at atch.se
Fri Sep 28 14:33:34 CEST 2018


Hi Remi,

On 2018-09-28 15:23, Rémi Denis-Courmont wrote:

> Le vendredi 28 septembre 2018, 15:04:33 EEST Filip Roséen a écrit :
> > LGTM, as long as we are sure that we will not (once again) step into
> > life-time issues related to the ownership of
> > `video_format_t.p_palette` (but as it worked before, well.. it at
> > least wouldn't get worse than what we had previously).
> 
> I have said it before and I will say it again: we should just kill p_palette 
> so that video format is actually POD like so much code assumes. The troubles 
> are not worth the benefits. It is just daft to treat paletized formats as 
> decoded formats nowadays.

Mhm, I definitely agree!

I have never been a fan of `p_palette`, and given the amount of
trouble we have had with lifetime problems due to changes not taking
the ownership into account. I would happily see it being
*plain-old-data*, and it would save us so much time when we have some
obscure patch because of some developer mismatching *copy-by-value* vs
`video_format_Clean`/`video_format_Init`/etc.

> We should just have a common helper to dereference paletized pictures into YUV 
> or RGB in the few affected video decoders.

/F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20180928/45ecf872/attachment.html>


More information about the vlc-devel mailing list