added webvtt support

Origin commit data
------------------
Branch: master
Commit: 0bc489d058
Author: Charles Duco <charlesduco@gmail.com>
Date: 2019-01-11 (Fri, 11 Jan 2019)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Charles Duco
2019-01-11 17:11:52 +01:00
committed by max_10
parent 59037d9d1f
commit 58427fc9b8
2 changed files with 9 additions and 2 deletions

View File

@@ -232,6 +232,10 @@ static int Write(Context_t *context, void *data)
{
fprintf(stderr, "{\"s_a\":{\"id\":%d,\"s\":%lld,\"e\":%lld,\"t\":\"%s\"}}\n", out->trackId, out->pts / 90, out->pts / 90 + out->durationMS, ass_get_text((char *)out->data));
}
else if (!strncmp("D_WEBVTT/SUBTITLES", Encoding, 18))
{
fprintf(stderr, "{\"s_a\":{\"id\":%d,\"s\":%lld,\"e\":%lld,\"t\":\"%s\"}}\n", out->trackId, out->pts / 90, out->pts / 90 + out->durationMS, json_string_escape((char *)out->data));
}
else
{
subtitle_err("unknown encoding %s\n", Encoding);