[vlc-devel] [PATCH 1/2] demux: Implement legacy fallbacks in the modules

Rémi Denis-Courmont remi at remlab.net
Tue Jan 16 15:21:34 CET 2018

Le 16 janvier 2018 15:54:50 GMT+02:00, Denis Charmet <typx at dinauz.org> a écrit :
>On 2018-01-16 14:11, Hugo Beauzée-Luyssen wrote:
>> This is a pre-requisite to revert
>> a2beb67ed706e299010c28d8733e2c0123b57168
>Why changing all the demuxes and not just do something like the 
>int demux_vaControl( demux_t *demux, int query, va_list args )
>     int ret = demux->pf_control( demux, query, args );
>     if (ret != VLC_SUCCESS && demux->s != NULL)
>         ret = demux_vaControlHelper( p_demux->s, 0, -1, 0, 1, query, 
>args );
>     return ret;
>Denis Charmet - TypX
>Le mauvais esprit est un art de vivre
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:

There are two problems with default handling:

1) In general, it breaks the threading model. The default ends up mucking with data belonging to the module without knowledge and control of that module.

It would not work with a threaded demux in this case - because you could end up with undefined reentrant use of the underlying stream.

2) You need to differentiate between failure and lack of implementation. You cannot do that with VLC_EGENERIC. We would have to replace it with a VLC_ENOSYS...

Remi Denis-Courmont

More information about the vlc-devel mailing list