[vlc-devel] [PATCH 1/2] demux: adaptive: avoid using a bool telling if the thread is not created
Steve Lhomme
robux4 at ycbcr.xyz
Tue Feb 11 10:08:06 CET 2020
On 2020-02-11 10:03, Francois Cartegnie wrote:
> Le 11/02/2020 à 10:01, Steve Lhomme a écrit :
>> We already have a variable to store it.
>> ---
>> modules/demux/adaptive/PlaylistManager.cpp | 18 ++++++++++--------
>> modules/demux/adaptive/PlaylistManager.h | 1 -
>> 2 files changed, 10 insertions(+), 9 deletions(-)
>>
>> diff --git a/modules/demux/adaptive/PlaylistManager.cpp b/modules/demux/adaptive/PlaylistManager.cpp
>> index a8bce7aca19..62c697e1432 100644
>> --- a/modules/demux/adaptive/PlaylistManager.cpp
>> +++ b/modules/demux/adaptive/PlaylistManager.cpp
>> @@ -62,7 +62,7 @@ PlaylistManager::PlaylistManager( demux_t *p_demux_,
>> currentPeriod = playlist->getFirstPeriod();
>> resources = res;
>> failedupdates = 0;
>> - b_thread = false;
>> + thread = nullptr;
>> b_buffering = false;
>
> AFAIK thread_t depends on platform
Arf, yes. I missed that part. Forget about this patch.
The other one is trying to use native C++ API/runtime for condition
variables. It seems more readable to be and is likely to be more solid
than our implementations on whatever platform we support.
More information about the vlc-devel
mailing list