From b6d8b0de92b805f4dbdbcee74cba5c8d8de48f7e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 12 Aug 2015 12:33:32 +0200 Subject: [PATCH] mkvmerge: add option for keeping track statistics tags --- ChangeLog | 7 +++++++ src/common/hacks.cpp | 1 + src/common/hacks.h | 3 ++- src/input/r_matroska.cpp | 3 ++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27f1d7482..c692e66eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2015-08-12 Moritz Bunkus + + * mkvmerge: enhancement: track statistics tags can be kept with + the option »--engage keep_track_statistics_tags«. This allows + outputting them in verbose identification mode for easier + parsing. + 2015-08-11 Moritz Bunkus * MKVToolNix GUI: new feature: jobs in the queue can now be edited diff --git a/src/common/hacks.cpp b/src/common/hacks.cpp index 82d85f82e..e530a413d 100644 --- a/src/common/hacks.cpp +++ b/src/common/hacks.cpp @@ -41,6 +41,7 @@ static const struct { { ENGAGE_NO_CUE_RELATIVE_POSITION, "no_cue_relative_position" }, { ENGAGE_NO_DELAY_FOR_GARBAGE_IN_AVI, "no_delay_for_garbage_in_avi" }, { ENGAGE_KEEP_LAST_CHAPTER_IN_MPLS, "keep_last_chapter_in_mpls" }, + { ENGAGE_KEEP_TRACK_STATISTICS_TAGS, "keep_track_statistics_tags" }, { 0, nullptr }, }; static std::vector s_engaged_hacks(ENGAGE_MAX_IDX + 1, false); diff --git a/src/common/hacks.h b/src/common/hacks.h index 17b1053cb..dbcaeadbf 100644 --- a/src/common/hacks.h +++ b/src/common/hacks.h @@ -38,7 +38,8 @@ #define ENGAGE_NO_CUE_RELATIVE_POSITION 17 #define ENGAGE_NO_DELAY_FOR_GARBAGE_IN_AVI 18 #define ENGAGE_KEEP_LAST_CHAPTER_IN_MPLS 19 -#define ENGAGE_MAX_IDX 19 +#define ENGAGE_KEEP_TRACK_STATISTICS_TAGS 20 +#define ENGAGE_MAX_IDX 20 void engage_hacks(const std::string &hacks); void engage_hack(unsigned int id); diff --git a/src/input/r_matroska.cpp b/src/input/r_matroska.cpp index 5ebce1f4f..561e9ff7b 100644 --- a/src/input/r_matroska.cpp +++ b/src/input/r_matroska.cpp @@ -1324,7 +1324,8 @@ kax_reader_c::read_headers_internal() { for (auto position : m_deferred_l1_positions[dl1t_tags]) handle_tags(m_in.get(), l0, position); - discard_track_statistics_tags(); + if (!hack_engaged(ENGAGE_KEEP_TRACK_STATISTICS_TAGS)) + discard_track_statistics_tags(); if (!m_ti.m_no_global_tags) process_global_tags();