[Rust]Ported ES Module to Rust#1736
Conversation
| } | ||
|
|
||
| if esstream.bits_left < 0 { | ||
| esstream.init_bitstream(gop_info_start_pos, gop_info_start_bpos as usize)?; |
There was a problem hiding this comment.
Should it be this? I think this has wrong parameters:
esstream.init_bitstream(gop_info_start_pos, esstream.data.len())?;
esstream.bpos = gop_info_start_bpos;
There was a problem hiding this comment.
Thanks, this was a mistake.
| let hi = cc_data[1] & 0x7F; // Get rid of parity bit | ||
| let lo = cc_data[2] & 0x7F; // Get rid of parity bit | ||
| if hi >= 0x20 { | ||
| output = format!("{}{}", hi as char, if lo >= 20 { lo as char } else { '.' }); |
There was a problem hiding this comment.
Is the lo >= 20 correct or should it be lo >= 0x20?
There was a problem hiding this comment.
It's the same in C, so I guess it's fine.
if (cc_valid && cc_type == channel)
{
hi = cc_data[1] & 0x7F; // Get rid of parity bit
lo = cc_data[2] & 0x7F; // Get rid of parity bit
if (hi >= 0x20)
{
output[0] = hi;
output[1] = (lo >= 20 ? lo : '.'); // here
output[2] = '\x00';
}
else
{
output[0] = '<';
output[1] = '>';
output[2] = '\x00';
}
}
There was a problem hiding this comment.
Should I make it 0x20?
There was a problem hiding this comment.
Yes, make it 0x20 for both versions, since ASCII printable characters starts at 0x20 and not 20.
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit ba59eb0...:
All tests passing on the master branch were passed completely. Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 12a27f3...:
All tests passing on the master branch were passed completely. Check the result page for more info. |
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
This PR ports the entire
es_functions.candes_userdata.cfiles to Rust.Tested on This sample