Commit a520fdbc authored by Stefan Westerfeld's avatar Stefan Westerfeld

testmpegts: add test which decodes the "vars" from prepared .ts

Signed-off-by: Stefan Westerfeld's avatarStefan Westerfeld <stefan@space.twc.de>
parent 0eb0d27e
......@@ -26,6 +26,7 @@
using std::string;
using std::vector;
using std::map;
using std::regex;
int
......@@ -61,6 +62,15 @@ main (int argc, char **argv)
if (entry.filename == argv[3])
fwrite (&entry.data[0], 1, entry.data.size(), stdout);
}
else if (argc == 3 && strcmp (argv[1], "vars") == 0)
{
TSReader reader;
Error err = reader.load (argv[2]);
map<string, string> vars = reader.parse_vars ("vars");
for (auto v : vars)
printf ("%s=%s\n", v.first.c_str(), v.second.c_str());
}
else if (argc == 3 && strcmp (argv[1], "perf") == 0)
{
for (int i = 0; i < 1000; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment