[QUESTION] Unexpected behavior of get_write_interval #800

Closed
opened 2026-01-29 16:53:44 +00:00 by claunia · 4 comments
Owner

Originally created by @IshanGrover2004 on GitHub (Apr 11, 2024).

CCExtractor version: 0.94

In raising this issue, I confirm the following:

  • 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.
  • I have ticked all the boxes in this section and to prove it I'm deleting the section completely to remove boilerplate text.

Necessary information

  • Is this a regression (i.e. did it work before)? NO
  • What platform did you use? LINUX
  • What were the used arguments? Doesn't matter in this case

Additional information

I was going through the codebase and testing things
I observed a function get_write_interval
where this function returns the bounds in which captions are present. So that means if caption/dtvcc_symbol in that case is default or 0 then it should return (0,0) answer
But it is returning (0,209) even the whole row is empty

Reason behind it:
0x00.is_set() is also considered as true

Question:
Is this a intentional behavior or just a mistake which is never noticed?

Originally created by @IshanGrover2004 on GitHub (Apr 11, 2024). CCExtractor version: 0.94 # In raising this issue, I confirm the following: - [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. - [x] I have ticked all the boxes in this section and to prove it I'm deleting the section completely to remove boilerplate text. # Necessary information - Is this a regression (i.e. did it work before)? NO - What platform did you use? LINUX - What were the used arguments? Doesn't matter in this case # Additional information I was going through the codebase and testing things I observed a function [`get_write_interval`](https://github.com/CCExtractor/ccextractor/blob/3f504412f54dc88cdcfbdbf56e4657d51a6d9b49/src/rust/src/decoder/tv_screen.rs#L106) where this function **returns the bounds in which captions are present**. So that means if `caption/dtvcc_symbol` in that case is default or 0 then it should return `(0,0)` answer But it is returning `(0,209)` even the whole row is empty Reason behind it: `0x00.is_set()` is also considered as true Question: Is this a intentional behavior or just a mistake which is never noticed?
Author
Owner

@IshanGrover2004 commented on GitHub (Apr 12, 2024):

@PunitLodha @prateekmedia @cfsmp3 @canihavesomecoffee Do you guys think, is this a actual problem?

@IshanGrover2004 commented on GitHub (Apr 12, 2024): @PunitLodha @prateekmedia @cfsmp3 @canihavesomecoffee Do you guys think, is this a actual problem?
Author
Owner

@cfsmp3 commented on GitHub (May 5, 2024):

@IshanGrover2004 You've been looking at the code more recently than we have :-)

Being blunt, in order to answer that I'd have to reread the specs, because while I remember the basics I definitely don't remember the details (or the coding decisions back then).

If it's broken, please fx it - ultimately all we care about is correctness in output.

@cfsmp3 commented on GitHub (May 5, 2024): @IshanGrover2004 You've been looking at the code more recently than we have :-) Being blunt, in order to answer that I'd have to reread the specs, because while I remember the basics I definitely don't remember the details (or the coding decisions back then). If it's broken, please fx it - ultimately all we care about is correctness in output.
Author
Owner

@IshanGrover2004 commented on GitHub (May 5, 2024):

@cfsmp3 I guess this is not reflecting any of the output bcs it fills basically 0 value to array
But while doing something like arr.is_empty() returns false bcs it has 0 values but technically it should be true if its an actuall issue
You can see like - it was becoming a hurdle in testing thats why i asked

@IshanGrover2004 commented on GitHub (May 5, 2024): @cfsmp3 I guess this is not reflecting any of the output bcs it fills basically 0 value to array But while doing something like `arr.is_empty()` returns false bcs it has 0 values but technically it should be true if its an actuall issue You can see like - it was becoming a hurdle in testing thats why i asked
Author
Owner

@IshanGrover2004 commented on GitHub (May 11, 2024):

Yes @cfsmp3, It was a minute mistake which I corrected in PR #1609

@IshanGrover2004 commented on GitHub (May 11, 2024): Yes @cfsmp3, It was a minute mistake which I corrected in PR #1609
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#800