mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
kutils: workaround issue wtih async access to the handle
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
751528cbe8
commit
a0041f5d78
2 changed files with 5 additions and 4 deletions
|
@ -219,9 +219,8 @@ void KAbstractPlayer::setFullscreen(bool fullscreen)
|
|||
|
||||
#define COMMON_DESTRUCTOR \
|
||||
kDebug() << i18n("destroying player"); \
|
||||
if (m_handle) { \
|
||||
mpv_terminate_destroy(m_handle); \
|
||||
} \
|
||||
m_stopprocessing = true; \
|
||||
mpv_terminate_destroy(m_handle); \
|
||||
if (m_settings) { \
|
||||
delete m_settings; \
|
||||
}
|
||||
|
@ -255,7 +254,7 @@ void KAbstractPlayer::setFullscreen(bool fullscreen)
|
|||
}
|
||||
|
||||
#define COMMMON_EVENT_HANDLER \
|
||||
while (m_handle) { \
|
||||
while (!m_stopprocessing) { \
|
||||
mpv_event *event = mpv_wait_event(m_handle, 0); \
|
||||
if (event->event_id == MPV_EVENT_NONE) { \
|
||||
break; \
|
||||
|
|
|
@ -270,6 +270,7 @@ private:
|
|||
#endif // MAKE_KMEDIAPLAYER_LIB
|
||||
QString m_appname;
|
||||
QSettings *m_settings;
|
||||
bool m_stopprocessing;
|
||||
};
|
||||
|
||||
|
||||
|
@ -336,6 +337,7 @@ private:
|
|||
#endif // MAKE_KMEDIAPLAYER_LIB
|
||||
QString m_appname;
|
||||
QSettings *m_settings;
|
||||
bool m_stopprocessing;
|
||||
};
|
||||
|
||||
#endif // KMEDIAPLAYER_H
|
||||
|
|
Loading…
Add table
Reference in a new issue