summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-04-10 19:40:45 +0100
committerCarl Hetherington <cth@carlh.net>2013-04-10 19:40:45 +0100
commit5c620f37c8979a645a2094aa36b9af3d4f4ef5ec (patch)
tree7fe2a2944a307fba827316fd3e496549a678db35 /src/lib
parentb66010a281acd3e3e58ef7202bce55023fc29d7f (diff)
Various fix-ups.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/player.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 19899f6da..c66d091cf 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -153,11 +153,11 @@ Player::seek (double t)
setup_decoders ();
_have_valid_decoders = true;
}
-
+
/* Find the decoder that contains this position */
_video_decoder = _video_decoders.begin ();
while (_video_decoder != _video_decoders.end ()) {
- double const this_length = (*_video_decoder)->video_length() / _film->video_frame_rate ();
+ double const this_length = double ((*_video_decoder)->video_length()) / _film->video_frame_rate ();
if (t < this_length) {
break;
}
@@ -179,6 +179,10 @@ Player::seek (double t)
void
Player::setup_decoders ()
{
+ _video_decoders.clear ();
+ _video_decoder = _video_decoders.end ();
+ _sndfile_decoders.clear ();
+
if (_video) {
list<shared_ptr<const VideoContent> > vc = _playlist->video ();
for (list<shared_ptr<const VideoContent> >::iterator i = vc.begin(); i != vc.end(); ++i) {