diff --git a/srtcore/common.h b/srtcore/common.h index f5d042f09..edd44eb30 100644 --- a/srtcore/common.h +++ b/srtcore/common.h @@ -771,7 +771,7 @@ class RollNumber return right < *this; } - bool operator=(const this_t& right) const + bool operator==(const this_t& right) const { return number == right.number; } diff --git a/srtcore/core.cpp b/srtcore/core.cpp index afc5ec32e..34f14efa1 100644 --- a/srtcore/core.cpp +++ b/srtcore/core.cpp @@ -9668,8 +9668,10 @@ int CUDT::processData(CUnit* in_unit) std::string s = tns1.str(); tns2 << "SRT:TsbPd:@" << s.substr(s.size()-2, 2); - ThreadName tn(tns2.str().c_str()); - const char* thname = tns2.str().c_str(); + const string& tn = tns2.str(); + + ThreadName tnkeep(tn.c_str()); + const char* thname = tn.c_str(); #else const char* thname = "SRT:TsbPd"; #endif