[BUG] dvb subtitles with depth 2 get wrong colors #435

Closed
opened 2026-01-29 16:43:51 +00:00 by claunia · 3 comments
Owner

Originally created by @atrottmann on GitHub (May 30, 2018).

Please prefix your issue with one of the following: [BUG], [PROPOSAL], [QUESTION].

CCExtractor version (using the --version parameter preferably) : 0.87
Git commit: 52707267fc

In raising this issue, I confirm the following (please check boxes, eg [X] - and delete unchecked ones):

  • I have read and understood the contributors guide.
  • I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present.
  • I have checked that the issue I'm posting isn't already reported.
  • I have checked that the issue I'm porting isn't already solved and no duplicates exist in closed issues and in opened issues
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • I have used the latest available version of CCExtractor to verify this issue exists.

My familiarity with the project is as follows (check one, eg [X] - and delete unchecked ones):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

Necessary information

  • Is this a regression (did it work before)? [X] NO | [ ] YES - please specify the last known working version
  • What platform did you use? [ ] Windows - [X] Linux - [ ] Mac
  • What were the used arguments? ``

**Video links (replace text below with your links) **

original video: https://gfguardian.werft22.net/public/dvbsub-issue/dvbsub.ts

correct subtitle image: https://guardian.werft22.net/public/dvbsub-issue/sub-correct.png
incorrect subtitle image: https://guardian.werft22.net/public/dvbsub-issue/sub-incorrect.png

Additional information

When I use ccextractor to convert video with dvb subtitles of depth 2 into spupng format, the colors are very wrong: in this example, I get red text with yellow outlines on a green background, even though it should be black text with bright yellow outline on a dark yellow background.

Apparently, the bug is in /src/lib_ccx/dvb_subtitle_decoder.c in the switch statement starting line 1595: The case for a depth of 2 is handled, but then falls through to case 8.

Inserting a "break" before the "case 8" fixes the problem for me.

Originally created by @atrottmann on GitHub (May 30, 2018). Please prefix your issue with one of the following: [BUG], [PROPOSAL], [QUESTION]. CCExtractor version (using the --version parameter preferably) : 0.87 Git commit: 52707267fc15c47282848976be93d1b00b4b906e **In raising this issue, I confirm the following (please check boxes, eg [X] - and delete unchecked ones):** - [X] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [X] I have checked that the bug-fix I am reporting can be replicated, or that the feature I am suggesting isn't already present. - [X] I have checked that the issue I'm posting isn't already reported. - [X] I have checked that the issue I'm porting isn't already solved and no duplicates exist in [closed issues](https://github.com/CCExtractor/ccextractor/issues?q=is%3Aissue+is%3Aclosed) and in [opened issues](https://github.com/CCExtractor/ccextractor/issues) - [X] I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion. - [X] I have used the latest available version of CCExtractor to verify this issue exists. **My familiarity with the project is as follows (check one, eg [X] - and delete unchecked ones):** - [ ] I have never used CCExtractor. - [ ] I have used CCExtractor just a couple of times. - [X] I absolutely love CCExtractor, but have not contributed previously. - [ ] I am an active contributor to CCExtractor. **Necessary information** - Is this a regression (did it work before)? [X] NO | [ ] YES - *please specify the last known working version* - What platform did you use? [ ] Windows - [X] Linux - [ ] Mac - What were the used arguments? `` **Video links (replace text below with your links) ** original video: https://gfguardian.werft22.net/public/dvbsub-issue/dvbsub.ts correct subtitle image: https://guardian.werft22.net/public/dvbsub-issue/sub-correct.png incorrect subtitle image: https://guardian.werft22.net/public/dvbsub-issue/sub-incorrect.png **Additional information** When I use ccextractor to convert video with dvb subtitles of depth 2 into spupng format, the colors are very wrong: in this example, I get red text with yellow outlines on a green background, even though it should be black text with bright yellow outline on a dark yellow background. Apparently, the bug is in /src/lib_ccx/dvb_subtitle_decoder.c in the switch statement starting line 1595: The case for a depth of 2 is handled, but then falls through to case 8. Inserting a "break" before the "case 8" fixes the problem for me.
Author
Owner

@thealphadollar commented on GitHub (May 30, 2018):

Hey @atrottmann, it's amazing that you have found the solution to your
problem. That's a hacker spirit there :D

You can anytime send a PR with the required changes, and it'll be reviewed
and merged if need be.

I absolutely love CCExtractor, but have not contributed previously.
Maybe it's time to tick another option from next time ;)

@thealphadollar commented on GitHub (May 30, 2018): Hey @atrottmann, it's amazing that you have found the solution to your problem. That's a hacker spirit there :D You can anytime send a PR with the required changes, and it'll be reviewed and merged if need be. >I absolutely love CCExtractor, but have not contributed previously. Maybe it's time to tick another option from next time ;)
Author
Owner

@atrottmann commented on GitHub (May 31, 2018):

Ok, that's now done as pull request #987 - thank you very much!

@atrottmann commented on GitHub (May 31, 2018): Ok, that's now done as pull request #987 - thank you very much!
Author
Owner

@cfsmp3 commented on GitHub (Sep 20, 2018):

Closing since it was fixed ages ago. Thanks @atrottmann !

@cfsmp3 commented on GitHub (Sep 20, 2018): Closing since it was fixed ages ago. Thanks @atrottmann !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#435