Skip to content

Conversation

@NilsIrl
Copy link
Contributor

@NilsIrl NilsIrl commented Jan 21, 2020

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

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

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

  • I have used CCExtractor just a couple of times.

And move some processing to compile time. It also uses functions that don't check needlessly against '\0'.

@ccextractor-bot
Copy link
Collaborator

ccextractor-bot commented Jan 21, 2020

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

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

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
Copy link
Collaborator

ccextractor-bot commented Jan 21, 2020

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

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

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.

ccx_options.write_format==CCX_OF_WEBVTT)
{
char *substr;
char substr[sizeof("</font><font color=\"#000000\">")];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A hardcoded string that appears more than once definitely belongs in a #define - otherwise a change in one of the instances will break stuff (particularly if sizeof is involved)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only appears once now.

I also managed to remove another O(N) operation. (copying sprintf output).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're processing streams, O(N) is the best we can possibly ask for :-) Don't obsess over micro-optimizations. If you see O (N^2) then that's something to worry about. But a 10 character memcpy() is not worth the time, even if it can be avoided.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I know 😂

it's not gonna change a lot.

O(N) is the best we can possibly ask for

yes but it's best to not copy stuff around when you don't have to

@cfsmp3 cfsmp3 merged commit 4097831 into CCExtractor:master Jan 22, 2020
@NilsIrl NilsIrl deleted the o_n_ops_mem_alloc branch January 22, 2020 17:06
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.

3 participants