diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-23 01:52:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-12-23 01:52:21 +0100 |
| commit | 6516fb170b0e7a83c582a858fb54d1f83f751cc0 (patch) | |
| tree | 2182093659f83d482352e844c2170dd3c550a15a /src/wx/simple_video_view.cc | |
| parent | e026ba2c11f16fe2d486acdd489050538e66fece (diff) | |
Various tweaks to fix playback at the end of a film (#1858).
The most questionable change here is probably how
SimpleVideoView::display_next_frame no longer re-schedules
itself if the call to get_next_frame returned AGAIN; it seems
wrong to do that when FilmViewer::idle_handler() also reschedules
itself when display_next_frame() returns AGAIN.
Diffstat (limited to 'src/wx/simple_video_view.cc')
| -rw-r--r-- | src/wx/simple_video_view.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/wx/simple_video_view.cc b/src/wx/simple_video_view.cc index 808f885f8..2b86ea688 100644 --- a/src/wx/simple_video_view.cc +++ b/src/wx/simple_video_view.cc @@ -156,19 +156,12 @@ SimpleVideoView::start () * false to ask the butler to block until it has video (unless it is suspended). * @return true on success, false if we did nothing because it would have taken too long. */ -bool +VideoView::NextFrameResult SimpleVideoView::display_next_frame (bool non_blocking) { - bool r = get_next_frame (non_blocking); - if (!r) { - if (non_blocking) { - /* No video available; return saying we failed */ - return false; - } else { - /* Player was suspended; come back later */ - signal_manager->when_idle (boost::bind(&SimpleVideoView::display_next_frame, this, false)); - return false; - } + NextFrameResult const r = get_next_frame (non_blocking); + if (r != SUCCESS) { + return r; } update (); @@ -179,7 +172,7 @@ SimpleVideoView::display_next_frame (bool non_blocking) error_dialog (get(), e.what()); } - return true; + return SUCCESS; } void |
