[vlc-devel] [PATCH 2/2] vlc_block: store per block ancillary

Francois Cartegnie fcvlcdev at free.fr
Wed Jun 27 18:58:39 CEST 2018

Le 27/06/2018 à 18:23, Rémi Denis-Courmont a écrit :
> As much as François likes to pretend that his patch works magically, it does 
> not. It's missing a truck load of updates and is heavily under-specified, some 
> of which were already mentioned and discarded multiple times.

It's not that I didn't consider and build using the ES out way first.
If I had to walk away from this, that's because there's many issues you
can't see.

> Obviously because nobody frees the allocation, or because it gets copied by 
> value.

Since when block_t struct itself isn't freed ?
If people copy by value, then that's to be fixed, and use helpers. Just
like the same issues we had with es_format. (what is the opaque p_extra
btw ?)

> Passing it in-band solves that problem either. How do you handle side data in 
> a block chain - the common case for packetizers? How does the generic block 
> chain helper know which byte each side datum is associated with? Maybe it even 
> needs to packetize the side data - not something a generic helper can do.
> For the umpteenth time, you _cannot_ pass data through. That concept looks 
> easy but it is totally flawed.

For the umpteenth time if that's not packetized then there's no
contextual sidedata since there's no sample. It will be dropped in the
block bytestream. Sidedata is produced by packetizers in that case.

And even if we wanted to, we could the same way we handle pts and dts on
the really same blocks in packetizer helpers.

Francois Cartegnie
VideoLAN - VLC Developer

More information about the vlc-devel mailing list