diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-28 22:59:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-28 22:59:41 +0100 |
| commit | fca4842c205bc2fa74af94955100ca873bffc5d0 (patch) | |
| tree | f1a10cf5db921c620937ceb4282e26d636f329cc /src/lib | |
| parent | 1432280f6c13d507690daf286e13cf850e612914 (diff) | |
Fix crash on preview playback reaching the end of the content (#131).
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/player.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index d62d8f8b6..a3d52f43e 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -299,6 +299,10 @@ Player::setup_decoders () double Player::last_video_time () const { + if (_video_decoder >= _video_decoders.size ()) { + return 0; + } + return _video_start[_video_decoder] + _video_decoders[_video_decoder]->last_content_time (); } |
