CCExtractor / ccextractor

CCExtractor - Official version maintained by the core team
https://www.ccextractor.org
GNU General Public License v2.0
721 stars 426 forks source link

[FIX] ccx_encoders_smptett.c: Enforce int for sprintf #1506

Closed marcybelardo closed 1 year ago

marcybelardo commented 1 year ago

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

My familiarity with the project is as follows (check one):


For issue #1483, refactors formatting of col1 and row1 variables to avoid issues with LC_NUMERIC auto-formatting float values.

ccextractor-bot commented 1 year ago

CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results:

Report Name Tests Passed
Broken 0/13
CEA-708 0/14
DVB 0/7
DVD 0/3
DVR-MS 0/2
General 0/27
Hauppage 0/3
MP4 0/3
NoCC 0/10
Options 0/87
Teletext 0/21
WTV 0/13
XDS 0/34

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).

Your PR breaks these cases:


Check the result page for more info.

ccextractor-bot commented 1 year ago

CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results:

Report Name Tests Passed
Broken 0/13
CEA-708 0/14
DVB 0/7
DVD 0/3
DVR-MS 0/2
General 0/27
Hauppage 0/3
MP4 0/3
NoCC 0/10
Options 0/87
Teletext 0/21
WTV 0/13
XDS 0/34

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).

Your PR breaks these cases:


Check the result page for more info.

marcybelardo commented 1 year ago

We really don't need to use a math function to convert from a float to an int :-) (losing the fractional part). A cast will do.

I'm not sure we are OK with that unneeded lost of precision though. I'd very much prefer to keep 2 or 3 decimal places.

Ah 😅 well, in that case, I'll aim for two!

cfsmp3 commented 1 year ago

Please make sure you test a bit before sending or updating a PR. Your code won't work for example for

3.099 which will get converted to 3.99

Reopen the PR (or start a new one) only after you have tested with many values. Thanks!

marcybelardo commented 1 year ago

Please make sure you test a bit before sending or updating a PR. Your code won't work for example for

3.099

which will get converted to 3.99

Reopen the PR (or start a new one) only after you have tested with many values. Thanks!

Got it, I'll work on this more~