mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
testVideo_input: Call DRing::fini
If not called, other threads might read memories freed by the exit handlers of the main thread, resulting in a race condition that can cause a segmentation fault. Gitlab: #545 Change-Id: I29ec4c1ffee96b6a083e36f31cd738daf622315d
This commit is contained in:
@ -38,25 +38,24 @@ class VideoInputTest : public CppUnit::TestFixture {
|
||||
public:
|
||||
static std::string name() { return "video_input"; }
|
||||
|
||||
VideoInputTest()
|
||||
{
|
||||
DRing::init(DRing::InitFlag(DRing::DRING_FLAG_DEBUG | DRing::DRING_FLAG_CONSOLE_LOG));
|
||||
DRing::start("dring-sample.yml");
|
||||
}
|
||||
|
||||
~VideoInputTest() { DRing::fini(); }
|
||||
|
||||
private:
|
||||
void testInput();
|
||||
void init_daemon();
|
||||
|
||||
CPPUNIT_TEST_SUITE(VideoInputTest);
|
||||
CPPUNIT_TEST(init_daemon);
|
||||
CPPUNIT_TEST(testInput);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(VideoInputTest, VideoInputTest::name());
|
||||
|
||||
void
|
||||
VideoInputTest::init_daemon()
|
||||
{
|
||||
DRing::init(DRing::InitFlag(DRing::DRING_FLAG_DEBUG | DRing::DRING_FLAG_CONSOLE_LOG));
|
||||
DRing::start("dring-sample.yml");
|
||||
}
|
||||
|
||||
void
|
||||
VideoInputTest::testInput()
|
||||
{
|
||||
|
Reference in New Issue
Block a user