diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-08-29 16:09:53 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-08-29 16:09:53 +0100 |
| commit | 609dd231fcbd8e44d4a857f0974ffc2a2a45bfca (patch) | |
| tree | 38f8ec3e886338416d53ae5ebdeded428e1c697f /src | |
| parent | 3c6e58b9e1430c6cbf3f28f4fd15a885aba5a237 (diff) | |
Fix another hang caused by Playlist::maybe_sequence being called
between PENDING and DONE for VIDEO_RATE_CHANGED. maybe_sequence
ends up with a call to get_video before the butler has heard
that the VIDEO_RATE_CHANGED is DONE.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/film.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index 93e7aa1c0..0000dca10 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -948,19 +948,19 @@ Film::signal_change (ChangeType type, Property p) if (type == CHANGE_TYPE_DONE) { _dirty = true; - switch (p) { - case Film::CONTENT: + if (p == Film::CONTENT) { set_video_frame_rate (_playlist->best_video_frame_rate ()); - break; - case Film::VIDEO_FRAME_RATE: - case Film::SEQUENCE: - _playlist->maybe_sequence (); - break; - default: - break; } emit (boost::bind (boost::ref (Change), type, p)); + + if (p == Film::VIDEO_FRAME_RATE || p == Film::SEQUENCE) { + /* We want to call Playlist::maybe_sequence but this must happen after the + main signal emission (since the butler will see that emission and un-suspend itself). + Doing it this way ensures that the Change signal above is emitted first. + */ + signal_manager->when_idle (boost::bind(&Playlist::maybe_sequence, _playlist.get())); + } } else { Change (type, p); } |
