plugins/screencast: Destroy renegotiate event
If I'm not mistaken, the renegotiate event is leaked. Also, its handler function can be hypothetically called after thhe ScreenCastStream object is destroyed.
This commit is contained in:
parent
0c49ae5360
commit
4c384d1e9f
1 changed files with 4 additions and 0 deletions
|
@ -360,6 +360,10 @@ ScreenCastStream::ScreenCastStream(ScreenCastSource *source, std::shared_ptr<Pip
|
||||||
ScreenCastStream::~ScreenCastStream()
|
ScreenCastStream::~ScreenCastStream()
|
||||||
{
|
{
|
||||||
m_closed = true;
|
m_closed = true;
|
||||||
|
|
||||||
|
if (m_pwRenegotiate) {
|
||||||
|
pw_loop_destroy_source(m_pwCore->pwMainLoop, m_pwRenegotiate);
|
||||||
|
}
|
||||||
if (m_pwStream) {
|
if (m_pwStream) {
|
||||||
pw_stream_destroy(m_pwStream);
|
pw_stream_destroy(m_pwStream);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue