viewer: fix regression where multiple viewers could play at once

This commit is contained in:
itsmattkc
2020-12-30 10:38:34 +11:00
parent 1cd07bc1f7
commit b604a7271d
+7 -3
View File
@@ -463,9 +463,13 @@ void ViewerWidget::PlayInternal(int speed, bool in_to_out_only)
return;
}
// Kindly tell all viewers to stop caching
if (pause_autocache_during_playback_) {
foreach (ViewerWidget* viewer, instances_) {
// Kindly tell all viewers to stop playing (and caching if that's been set as an option)
foreach (ViewerWidget* viewer, instances_) {
if (viewer != this) {
viewer->Pause();
}
if (pause_autocache_during_playback_) {
viewer->auto_cacher_.ClearVideoQueue();
}
}