[BUG] encoders: WebVTT encoder generates invalid ## delimiter and malformed @import violating W3C specification
Maintainers usually reply within 7 days
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
Both defects are in src/lib_ccx/ccx_encoders_webvtt.c: start with write_webvtt_header, where the STYLE block ends in the invalid ## token, then the @import call around line 278 that is emitted outside any STYLE block. Fix the block terminator to a plain blank line and emit the import as @import url("..."); inside a STYLE block. Done means running --webvtt --webvtt-css-rule=... on a sample input produces output a WebVTT parser accepts with no ## or bare @import(.
Written by the indexing model from the issue text.
Description
CCExtractor version: 0.94+ (git commit 77daaddb9f61a356e4a7732179212b192f9656b6)
Necessary information
- Is this a regression (i.e. did it work before)? NO
- What platform did you use? Linux (Ubuntu 24.04 LTS x86_64)
- What were the used arguments?
--webvtt --webvtt-css-rule="..." input.ts
Additional information
In src/lib_ccx/ccx_encoders_webvtt.c, write_webvtt_header outputs inline CSS styles when --webvtt-css-rule is provided:
if (context->webvtt_css_rule)
{
fdprintf(context->out->fh, "STYLE\n\n::cue {\n%s\n}\n##\n\n", context->webvtt_css_rule);
}
Under Section 4.3 of the W3C WebVTT specification, blocks (such as STYLE or NOTE) must terminate and separate from subsequent blocks or cues with a blank line (\n\n). Emitting ##\n\n injects an invalid token into the WebVTT stream. In browser video players (Chromium, Firefox), this token is treated as an invalid cue identifier or malformed block, causing parsers to reject the styling block or fail cue playback.
Additionally, at line 278:
fdprintf(context->out->fh, "@import(%s);\n\n", context->sentence_cap_file);
External stylesheets are written directly into the file body without being enclosed inside a STYLE block and without valid CSS @import url("...") syntax.
- Dominant language
- C
- Stars
- 919
- Forks
- 604
- Avg merge
- 13d 12h
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CCExtractor/ccextractor
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CCExtractor/ccextractor#2478 ·
Maintainers usually reply within 7 days
-
[BUG] MXF: update_tid_lut() writes past tracks[32] onto nb_tracks, turning a file-supplied track id into the write offsetPossibly taken @pranayr710 claimed this 12 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
CCExtractor/ccextractor#2457 ·
Maintainers usually reply within 7 days
-
[Security] Heap buffer overflow (OOB read past GPAC sample buffer) in process_avc_sample() at mp4.c:99 when parsing a crafted MP4 filePossibly taken @yasar710 claimed this 18 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
CCExtractor/ccextractor#2449 ·
Maintainers usually reply within 7 days
-
[BUG] DVB subtitle decoder: heap-buffer-overflow write in dvbsub_parse_clut_segment via unbounded entry_idPossibly taken @Aditya-Saroha claimed this 21 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
CCExtractor/ccextractor#2440 ·
Maintainers usually reply within 7 days
-
[BUG] Filename sequence expansion (`+`) panics on numeric values exceeding `i32::MAX`Possibly taken @NaitikVerma6776 claimed this 12 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
CCExtractor/ccextractor#2402 ·
Maintainers usually reply within 7 days
All issues in CCExtractor/ccextractor
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
python-pillow/Pillow#10590 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
openwrt/packages#31407 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day