From 0f9cd0b2a7a9632bd986bc96e8037fe93f8b4704 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 31 Jan 2004 09:08:28 +0000 Subject: [PATCH] Also mark packets as being freeable when P frames are encountered but use the frame they reference for freeing. Allows for better handling of sections with few/no key frames. --- ChangeLog | 5 +++++ src/cluster_helper.cpp | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 740c96f0c..7d875c8a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-01-31 Moritz Bunkus + + * mkvmerge: Improved some internal memory freeing decisions. This + should help with files/sections in which are only few keyframes. + 2004-01-30 Moritz Bunkus * mkvmerge: Changed the two-pass splitting into a one-pass diff --git a/src/cluster_helper.cpp b/src/cluster_helper.cpp index d66c9b49d..de959a640 100644 --- a/src/cluster_helper.cpp +++ b/src/cluster_helper.cpp @@ -490,6 +490,10 @@ int cluster_helper_c::render() { timecode_offset), *data_buffer, *bref_packet->group, lacing_type); + + // All packets with an ID smaller than the referenced packet's ID + // are not needed anymore. Be happy! + free_ref(pack->bref, pack->source); } } else { // This is a key frame. No references.