[vlc-devel] [PATCH 2/3] vout: decklink: only set the vd->sys when everything is OK
Steve Lhomme
robux4 at ycbcr.xyz
Wed Jul 17 07:47:19 CEST 2019
On 2019-07-16 20:02, Rémi Denis-Courmont wrote:
> Le tiistaina 16. heinäkuuta 2019, 15.51.36 EEST Steve Lhomme a écrit :
>> ---
>> modules/video_output/decklink.cpp | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> I don't care either way, but AFAIK this is actually useless.
> Unlike callbacks, setting (p_)sys early will not cause problems in any other
> properly written module.
That's the thing. If this module improperly sets vd->sys and errors and
the next module in line uses vd->sys before it sets it we have a
problem. This change prevents the other module from doing bad stuff.
Even though this would be really bad code. It's a cheap extra safety.
BTW in 3/3 I mentioned 'created from uninitialized vd->fmt' but in fact
it's always initialized to source with 0 SAR.
More information about the vlc-devel
mailing list