Skip to content

Improve diagnostic message for unsupported DVB string-coded (character-coded) subtitle objects - #2313

Open
GuTS805 wants to merge 4 commits into
CCExtractor:masterfrom
GuTS805:fix-dvb-string-coding-2303
Open

Improve diagnostic message for unsupported DVB string-coded (character-coded) subtitle objects#2313
GuTS805 wants to merge 4 commits into
CCExtractor:masterfrom
GuTS805:fix-dvb-string-coding-2303

Conversation

@GuTS805

@GuTS805 GuTS805 commented Aug 11, 2026

Copy link
Copy Markdown

[IMPROVEMENT]

dvbsub_parse_object_segment() (src/lib_ccx/dvb_subtitle_decoder.c) hits an unimplemented branch when a DVB subtitle object segment uses object_coding_method == 1 (character-coded / "string coding", ETSI EN 300 743 §7.2.5) instead of the supported bitmap encoding. Previously this only printed a bare "FIXME support for string coding standard" with no further context. This PR replaces that with a clear, actionable message explaining what happened and that it's non-fatal (other objects/regions in the same packet are still processed normally).

The return value is intentionally left unchanged (return 0) — an earlier version of this PR changed it to return -1, but that caused dvbsub_decode()'s segment loop to abort the entire packet, which broke other valid objects/regions sharing that packet in CI (sampleplatform regression test 21). This version keeps behavior identical to master, changing only the diagnostic text.

Fixes #2303

In raising this pull request, I confirm the following (please check boxes):

Reason for this PR:

  • This PR adds new functionality.
  • This PR fixes a bug that I have personally experienced or that a real user has reported and for which a sample exists.
  • This PR is porting code from C to Rust.

Sanity check:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • If the PR adds new functionality, I've added it to the changelog. If it's just a bug fix, I have NOT added it to the changelog.
  • I am NOT adding new C code unless it's to fix an existing, reproducible bug.

Repro instructions:

  1. Build a minimal MPEG-TS stream: PAT → PMT with a DVB subtitling_descriptor (tag 0x59) → PES packets carrying a page/region/object-segment sequence where the object segment sets object_coding_method = 1. Sample file attached below (not committed to the repo, per earlier feedback — this is just an attachment for reviewers).
  2. Run: ccextractor <sample>.ts -out=spupng -o /tmp/test
  3. Before this change: prints FIXME support for string coding standard with no further context.
  4. After this change: prints a clear message stating the object is unsupported and explaining that other objects/regions in the packet are still processed — same program behavior/exit code as before, only the diagnostic text changed.

Note on CI: format_rust (./src/rust) fails on this PR, but this is a pre-existing, unrelated clippy lint failure in src/demuxer/stream_functions.rs (a file this PR never touches) — the same failure currently appears on other unrelated open PRs (e.g. #2301, #2302), so it isn't caused by this change.

GuTS805 added 4 commits August 5, 2026 04:49
…ects

dvbsub_parse_object_segment() previously returned 0 (success) when
encountering a character-coded (coding_method == 1) DVB subtitle
object, silently dropping the caption content. Now returns -1 so
the caller (dvbsub_decode) correctly treats this as a failure.

Fixes CCExtractor#2303
dvb_string_coding_sample.ts is a minimal MPEG-TS file (PAT+PMT+DVB
subtitle PES) whose object segment uses object_coding_method=1
(character-coded), triggering the previously-silent failure fixed
in the previous commit. build_dvb_sample.py documents how it was
constructed for future reference.

Repro:
  ccextractor dvb_string_coding_sample.ts -out=spupng -o /tmp/test
Before fix: prints 'FIXME support for string coding standard' and
reports 'No captions were found' with no error.
After fix: prints 'Return from dvbsub_decode: -1', a real,
surfaced failure.
… message

CI caught a regression: returning -1 aborted dvbsub_decode()'s entire
segment loop for the packet, dropping other valid objects/regions that
happened to share the same packet as an unsupported string-coded one.
Restored the original safe return value; only the diagnostic message
changed to make the failure unambiguous instead of a bare FIXME.
These don't belong in the main source tree per maintainer feedback -
sample-based testing goes through the dedicated sample platform, not
committed files. Repro steps are documented in the PR description
instead.
@ccextractor-bot

Copy link
Copy Markdown
Collaborator
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 6077cf5...:
Report Name Tests Passed
Broken 9/13
CEA-708 2/14
DVB 0/7
DVD 3/3
DVR-MS 2/2
General 22/27
Hardsubx 1/1
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 69/86
Teletext 0/21
WTV 12/13
XDS 31/34

Your PR breaks these cases:

NOTE: The following tests have been failing on the master branch as well as the PR:


It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you).

Check the result page for more info.

@ccextractor-bot

Copy link
Copy Markdown
Collaborator
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit c328108...:
Report Name Tests Passed
Broken 9/13
CEA-708 2/14
DVB 0/7
DVD 3/3
DVR-MS 2/2
General 22/27
Hardsubx 1/1
Hauppage 3/3
MP4 3/3
NoCC 10/10
Options 69/86
Teletext 0/21
WTV 12/13
XDS 31/34

Your PR breaks these cases:

NOTE: The following tests have been failing on the master branch as well as the PR:


It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you).

Check the result page for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DVB subtitle decoder silently discards character-coded ("string coding") object segments — coding_method == 1 is a no-op that reports success

2 participants