Make sure the audio/video availability information changes atomically.
So there's a consistent picture of the stream availability. Change-Id: Id7ea166353c0151fcc11105a1e233e9fe8df9cc6 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
24ced13a25
commit
2a7c2e695b
@@ -1384,12 +1384,16 @@ void QGstreamerPlayerSession::getStreamsInfo()
|
||||
}
|
||||
|
||||
|
||||
if (haveAudio != m_audioAvailable) {
|
||||
bool emitAudioChanged = (haveAudio != m_audioAvailable);
|
||||
bool emitVideoChanged = (haveVideo != m_videoAvailable);
|
||||
|
||||
m_audioAvailable = haveAudio;
|
||||
m_videoAvailable = haveVideo;
|
||||
|
||||
if (emitAudioChanged) {
|
||||
emit audioAvailableChanged(m_audioAvailable);
|
||||
}
|
||||
if (haveVideo != m_videoAvailable) {
|
||||
m_videoAvailable = haveVideo;
|
||||
if (emitVideoChanged) {
|
||||
emit videoAvailableChanged(m_videoAvailable);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user