Re-added the "timecode" warning, but only if it is turned on via --engage enable_timecode_warning.

This commit is contained in:
Moritz Bunkus 2007-03-05 19:18:24 +00:00
parent 4a6674e730
commit 93a5083066
3 changed files with 9 additions and 7 deletions

View File

@ -42,6 +42,7 @@ static const char *mosu_hacks[] = {
ENGAGE_USE_SIMPLE_BLOCK,
ENGAGE_OLD_AAC_CODECID,
ENGAGE_USE_CODEC_STATE,
ENGAGE_ENABLE_TIMECODE_WARNING,
NULL
};
static vector<string> engaged_hacks;

View File

@ -39,6 +39,7 @@ using namespace std;
#define ENGAGE_USE_SIMPLE_BLOCK "use_simpleblock"
#define ENGAGE_OLD_AAC_CODECID "old_aac_codecid"
#define ENGAGE_USE_CODEC_STATE "use_codec_state"
#define ENGAGE_ENABLE_TIMECODE_WARNING "enable_timecode_warning"
void MTX_DLL_API engage_hacks(const string &hacks);
bool MTX_DLL_API hack_engaged(const string &hack);

View File

@ -28,6 +28,7 @@
#include "common.h"
#include "commonebml.h"
#include "compression.h"
#include "hacks.h"
#include "mkvmerge.h"
#include "output_control.h"
#include "pr_generic.h"
@ -914,13 +915,12 @@ generic_packetizer_c::add_packet2(packet_cptr pack) {
"contains a bug. In this case you should contact the author "
"Moritz Bunkus <moritz@bunkus.org>.\n", ti.fname.c_str(), ti.id,
(needed_timecode_offset + 500000) / 1000000);
}
// } else
// mxwarn("pr_generic.cpp/generic_packetizer_c::add_packet(): timecode < "
// "last_timecode (" FMT_TIMECODE " < " FMT_TIMECODE ") for " LLD
// " of '%s'. %s\n", ARG_TIMECODE_NS(pack->timecode),
// ARG_TIMECODE_NS(safety_last_timecode), ti.id, ti.fname.c_str(),
// BUGMSG);
} else if (hack_engaged(ENGAGE_ENABLE_TIMECODE_WARNING))
mxwarn("pr_generic.cpp/generic_packetizer_c::add_packet(): timecode < "
"last_timecode (" FMT_TIMECODE " < " FMT_TIMECODE ") for " LLD
" of '%s'. %s\n", ARG_TIMECODE_NS(pack->timecode),
ARG_TIMECODE_NS(safety_last_timecode), ti.id, ti.fname.c_str(),
BUGMSG);
}
safety_last_timecode = pack->timecode;
safety_last_duration = pack->duration;