mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
Unknown four-byte data inserted in WEBVTT files before the timestamp #194
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @atrottmann on GitHub (Nov 1, 2016).
When generating WEBVTT data from a MPEGTS stream, I get what appears to be four bytes of binary data immediately before the timestamp on every line.
out-vtt.zip
The attached file (zipped, because github didn't let me upload the raw .vtt) shows this: After the WEBVTT<0x0d><0x0a> header there are the bytes 0x50 0xf9 0xd9 0x01 before the text-form timestamp 00:00:15.120
I do not understand the purpose of those bytes and suspect a bug.
The source file ./lib_ccx/ccx_encoders_webvtt.c contains the following code at the beginning of write_stringz_as_webvtt:
This appears to be a duplicate of the code that runs right afterwards, after the timestamp has been sprintf'd, and I do not find a purpose for it. If I correctly understand the code, this just outputs some uninitialized data, which results in the four bytes of apparent garbage that I saw in the generated WEBVTT file.
If i comment this out, it appears to create correct WEBVTT files.
Kind regards,
Andreas Trottmann