2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Sync video to audio stream fixed. Cute video download inside MediaView.

Small round radius in webpage photo / doc nested attachments.
This commit is contained in:
John Preston
2016-07-19 13:54:43 +03:00
parent 12523f4c0c
commit 207981b8c4
10 changed files with 107 additions and 77 deletions

View File

@@ -581,6 +581,12 @@ void AudioPlayer::pauseFromVideo(uint64 videoPlayId) {
} break;
}
emit faderOnTimer();
QMutexLocker videoLock(&_lastVideoMutex);
if (_lastVideoPlayId == videoPlayId) {
_lastVideoPlaybackWhen = 0;
_lastVideoPlaybackCorrectedMs = 0;
}
}
if (current) emit updated(current);
}
@@ -663,8 +669,10 @@ void AudioPlayer::videoSoundProgress(const AudioMsgId &audio) {
t_assert(current != nullptr);
if (current->videoPlayId == _lastVideoPlayId && current->playbackState.duration && current->playbackState.frequency) {
_lastVideoPlaybackWhen = getms();
_lastVideoPlaybackCorrectedMs = (current->playbackState.position * 1000ULL) / current->playbackState.frequency;
if (current->playbackState.state == AudioPlayerPlaying) {
_lastVideoPlaybackWhen = getms();
_lastVideoPlaybackCorrectedMs = (current->playbackState.position * 1000ULL) / current->playbackState.frequency;
}
}
}