From 1d01ec45990179d51fb61a19497bb62948fafd21 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 31 Jan 2004 10:47:36 +0000 Subject: [PATCH] Do not automatically discard big VobSub packets anymore. --- ChangeLog | 3 +++ src/common/common.cpp | 1 + src/hacks.h | 1 + src/input/r_vobsub.cpp | 3 ++- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7d875c8a2..81b7a9c4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-01-31 Moritz Bunkus + * mkvmerge: The VobSub reader will not discard packets that exceed + a certain size (64KB) anymore. + * mkvmerge: Improved some internal memory freeing decisions. This should help with files/sections in which are only few keyframes. diff --git a/src/common/common.cpp b/src/common/common.cpp index 67e9fce24..4abd77d69 100644 --- a/src/common/common.cpp +++ b/src/common/common.cpp @@ -1291,6 +1291,7 @@ static const char *mosu_hacks[] = { ENGAGE_NO_VARIABLE_DATA, ENGAGE_NO_DEFAULT_HEADER_VALUES, ENGAGE_FORCE_PASSTHROUGH_PACKETIZER, + ENGAGE_SKIP_BIG_VOBSUBS, NULL }; static vector engaged_hacks; diff --git a/src/hacks.h b/src/hacks.h index 0544e10ec..f9f28490d 100644 --- a/src/hacks.h +++ b/src/hacks.h @@ -32,6 +32,7 @@ #define ENGAGE_NO_VARIABLE_DATA "no_variable_data" #define ENGAGE_NO_DEFAULT_HEADER_VALUES "no_default_header_values" #define ENGAGE_FORCE_PASSTHROUGH_PACKETIZER "force_passthrough_packetizer" +#define ENGAGE_SKIP_BIG_VOBSUBS "skip_big_vobsubs" bool hack_engaged(const char *hack); diff --git a/src/input/r_vobsub.cpp b/src/input/r_vobsub.cpp index 86227cdb7..e33ed7c0d 100644 --- a/src/input/r_vobsub.cpp +++ b/src/input/r_vobsub.cpp @@ -25,6 +25,7 @@ #include #include "common.h" +#include "hacks.h" #include "iso639.h" #include "mkvmerge.h" #include "mm_io.h" @@ -325,7 +326,7 @@ vobsub_reader_c::read(generic_packetizer_c *ptzr) { id = i; i = track->idx; - if (track->sizes[i] > 64 * 1024) { + if ((track->sizes[i] > 64 * 1024) && hack_engaged(ENGAGE_SKIP_BIG_VOBSUBS)) { mxwarn(PFX "Skipping entry at timecode %llds of track ID %u in '%s' " "because it is too big (%lld bytes). This is usually the case for " "the very last index lines for each track in the .idx file because "