summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-13 14:38:12 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-13 14:38:12 +0100
commit13aae5d8ff27886656ab7ea3ef1194987954bb3f (patch)
tree315d023a86f16fa8c0ae2e2c87fbc20071316fe8 /src/lib/player.cc
parent1daaa67c21d4d28757cdcb06c5e26aec3817867c (diff)
Remove caching of old ImageDecoder objects.
This breaks things when there is a 3D ImageContent. When you change the video frame type on this content the view does not update because the re-used ImageDecoder recycles the same video without noticing that the frame type has changed. I guess this is sort of `because' the video frame type is used in VideoDecoder::give, which sets up the cache. Unfortunately I can't remember the case which the caching of ImageDecoders was meant to speed up. Maybe this will now become apparent.
Diffstat (limited to 'src/lib/player.cc')
-rw-r--r--src/lib/player.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index d437d5b1b..f22a6480f 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -115,14 +115,6 @@ Player::Player (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist
void
Player::setup_pieces ()
{
- list<shared_ptr<ImageDecoder> > old_image_decoders;
- BOOST_FOREACH (shared_ptr<Piece> i, _pieces) {
- shared_ptr<ImageDecoder> imd = dynamic_pointer_cast<ImageDecoder> (i->decoder);
- if (imd) {
- old_image_decoders.push_back (imd);
- }
- }
-
_pieces.clear ();
BOOST_FOREACH (shared_ptr<Content> i, _playlist->content ()) {
@@ -131,7 +123,7 @@ Player::setup_pieces ()
continue;
}
- shared_ptr<Decoder> decoder = decoder_factory (i, old_image_decoders, _film->log(), _fast);
+ shared_ptr<Decoder> decoder = decoder_factory (i, _film->log(), _fast);
FrameRateChange frc (i->active_video_frame_rate(), _film->video_frame_rate());
if (!decoder) {