Skip to content

Commit e34ee54

Browse files
authored
Merge pull request #42 from raymanfx/fix
linux: Fix memory corruption on stream stop
2 parents d90ac49 + 44954d1 commit e34ee54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

linux/platformstream.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ void PlatformStream::close()
361361
m_owner = nullptr;
362362
m_width = 0;
363363
m_height = 0;
364-
m_frameBuffer.resize(0);
365364
m_isOpen = false;
366365
m_quitThread = true;
367366

@@ -374,6 +373,7 @@ void PlatformStream::close()
374373
m_helperThread = nullptr;
375374
}
376375

376+
m_frameBuffer.resize(0);
377377
::close(m_deviceHandle);
378378

379379
m_deviceHandle = -1;

0 commit comments

Comments
 (0)