2
mkvmerge -- utility for splicing together matroska files
3
from component media subtypes
5
Distributed under the GPL
6
see the file COPYING for details
7
or visit http://www.gnu.org/copyleft/gpl.html
9
$Id: hacks.cpp 3071 2005-09-06 09:47:27Z mosu $
13
Written by Moritz Bunkus <moritz@bunkus.org>.
29
static const char *mosu_hacks[] = {
30
ENGAGE_SPACE_AFTER_CHAPTERS,
31
ENGAGE_NO_CHAPTERS_IN_META_SEEK,
36
ENGAGE_NO_VARIABLE_DATA,
37
ENGAGE_NO_DEFAULT_HEADER_VALUES,
38
ENGAGE_FORCE_PASSTHROUGH_PACKETIZER,
39
ENGAGE_AVC_USE_BFRAMES,
40
ENGAGE_WRITE_HEADERS_TWICE,
41
ENGAGE_ALLOW_AVC_IN_VFW_MODE,
42
ENGAGE_KEEP_BITSTREAM_AR_INFO,
45
static vector<string> engaged_hacks;
48
hack_engaged(const string &hack) {
49
vector<string>::const_iterator hit;
51
foreach(hit, engaged_hacks)
59
engage_hacks(const string &hacks) {
60
vector<string> engage_args;
64
engage_args = split(hacks, ",");
65
for (aidx = 0; aidx < engage_args.size(); aidx++)
66
if (engage_args[aidx] == "list") {
67
mxinfo("Valid hacks are:\n");
68
for (hidx = 0; mosu_hacks[hidx] != NULL; hidx++)
69
mxinfo("%s\n", mosu_hacks[hidx]);
71
} else if (engage_args[aidx] == "cow") {
72
const string initial = "ICAgICAgICAgIChfXykKICAgICAgICAgICgqKikg"
73
"IE9oIGhvbmV5LCB0aGF0J3Mgc28gc3dlZXQhCiAgIC8tLS0tLS0tXC8gICBPZiB"
74
"jb3Vyc2UgSSdsbCBtYXJyeSB5b3UhCiAgLyB8ICAgICB8fAogKiAgfHwtLS0tfH"
75
"wKICAgIF5eICAgIF5eCg==";
77
memset(correction, 0, 200);
78
base64_decode(initial, (unsigned char *)correction);
79
mxinfo("%s", correction);
82
for (aidx = 0; aidx < engage_args.size(); aidx++) {
84
for (hidx = 0; mosu_hacks[hidx] != NULL; hidx++)
85
if (engage_args[aidx] == mosu_hacks[hidx]) {
87
engaged_hacks.push_back(mosu_hacks[hidx]);
91
mxerror("'%s' is not a valid hack.\n", engage_args[aidx].c_str());