[vlc-devel] [PATCH] stream_filter: httplive: factorize segment read and remove vlc_object_alive
fcvlcdev at free.fr
Tue Apr 21 00:30:46 CEST 2015
Le 20/04/2015 21:21, Rémi Denis-Courmont a écrit :
>> /* */
>> if (p_sys->download.seek >= 0)
>> p_sys->download.segment = p_sys->download.seek;
>> p_sys->download.seek = -1;
>> - if (!vlc_object_alive(s)) break;
>> + vlc_testcancel();
> It smells like you have sprinkled magic cancel dust with no obvious logic
Looks to me it does exit when input closes, and at the same location.
Unsure if the comment is about behaviour or superfluous cancellation points.
> Generally, for the sake of maintainability, it is best to leave cancellation
> enabled only in one or a few strategical sleeping location and disabled it
> everywhere else.
Probably easier to keep it in main thread only.
More information about the vlc-devel