]> git.sesse.net Git - nageru/commitdiff
Fix some memory spikes.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 30 Oct 2018 18:17:26 +0000 (19:17 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 30 Oct 2018 18:17:26 +0000 (19:17 +0100)
jpeg_frame_view.cpp

index 82e34e42f9ed83528753d16d53452e23e5e444f9..59673d5e77459168e709b59b4d62478cf0bf6da8 100644 (file)
@@ -328,6 +328,7 @@ void JPEGFrameView::insert_interpolated_frame(JPEGID id, shared_ptr<Frame> frame
        // that would sound like a reasonable assumption.
        unique_lock<mutex> lock(cache_mu);
        cache[id] = LRUFrame{ std::move(frame), event_counter++ };
+       prune_cache();
 }
 
 ResourcePool *resource_pool = nullptr;