[vlc-devel] [PATCH 2/2] filters: use filter_Flush() instead of accessing the callback directly

Rémi Denis-Courmont remi at remlab.net
Mon Oct 12 16:34:21 CEST 2020


Le maanantaina 12. lokakuuta 2020, 17.16.47 EEST Steve Lhomme a écrit :
> It's easier to find out who flushes filters and when.

This is a very bad practice. Modules should not call into themselves via the 
core functions. This is prone to reentrancy bugs if filter_Flush() ever chagnes 
to do something else than call the flush callback.

> It's also easier to reorder the code without having the Flush callback above
> a lot of common code.

There's no real common code here. Different function calls different function.

-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list