mcut.cc source code and bugs

Moderators: Gully, peteru

Post Reply
prl
Wizard God
Posts: 32709
Joined: Tue Sep 04, 2007 13:49
Location: Canberra; Black Mountain Tower transmitters

mcut.cc source code and bugs

Post by prl » Mon Mar 27, 2017 21:44

adoxa wrote:... Since it's included with the release, shouldn't its source be part of easy-ui-4, too?
I don't know about "should" or not, but it's not the only pre-installed plugin that's not in the easy-4-ui source. EPGSearch and AutoTimers are commonly-used pre-installed plugins that aren't in the easy-ui-4 source.
Peter
T4 HDMI
U4, T4, T3, T2, V2 test/development machines
Sony BDV-9200W HT system
LG OLED55C9PTA 55" OLED TV

User avatar
peteru
Uber Wizard
Posts: 9741
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: SDK 16.1.20170311 available

Post by peteru » Mon Mar 27, 2017 21:59

Code: Select all

root@devt4:~# opkg search *mcut*
enigma2-plugin-extensions-moviecut - 2.0+git6295+146ea49-r10.3
root@devt4:~# opkg info enigma2-plugin-extensions-moviecut
Deprecated version constraint '>' was used with the same meaning as '>='. Use '>>' for LATER constraint.
Package: enigma2-plugin-extensions-moviecut
Version: 2.0+git6295+146ea49-r10.3
Depends: libgcc1 (>= 5.3.0), libstdc++6 (>= 5.3.0), libc6 (>= 2.23)
Status: install ok installed
Section: base
Architecture: inihdp
Maintainer: OE-Alliance team
MD5Sum: f5f061fb2dd8e18dd0b89dc6d849a211
Size: 29162
Filename: enigma2-plugin-extensions-moviecut_2.0+git6295+146ea49-r10.3_inihdp.ipk
Source: git://github.com/beyonwiz/enigma2-plugins.git;protocol=git;branch=2.3 file://pluginnotwanted.patch
Description: extensions-moviecut  Perform the cuts specified with the Cutlist editor
Installed-Size: 82605
Installed-Time: 1489233857
You can either grab the source from GitHub, or install it using:

Code: Select all

opkg install enigma2-plugin-extensions-moviecut-src
In general, the above approach is the best way of determining where the source of a particular package comes from. Get the info on the package itself and then either follow the listed src URI or install the *-src version.

"Beauty lies in the hands of the beer holder."
Blog.

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: SDK 16.1.20170311 available

Post by adoxa » Mon Mar 27, 2017 23:16

That's what I did, but the binary I generated from source is apparently different to the binary that comes with the firmware, since the original will stop cutting prematurely (only rarely, but still) whereas the generated one will keep going.

User avatar
peteru
Uber Wizard
Posts: 9741
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: SDK 16.1.20170311 available

Post by peteru » Tue Mar 28, 2017 02:09

Have you got a test case?

I had a look at mcut.cc and it's a pretty sad piece of code. Lots of signed 32-bit arithmetic in use, so I suspect that the failures will be on any quantities that overflow about 2GB value.

I had to fix some 32-bit issues in createapscfiles.cc, which was written by the same author.

"Beauty lies in the hands of the beer holder."
Blog.

User avatar
peteru
Uber Wizard
Posts: 9741
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: mcut.cc source code and bugs

Post by peteru » Tue Mar 28, 2017 02:29

BTW: The mcut.cc code has not seen any changes for about 6 years.

I'm pretty sure that editing recordings on enigma2 boxes is a very rare thing, so most of the time bugs and shortcomings related to such activities would go unnoticed. That's not to say that it shouldn't be fixed. Having a test case will help. A pull-request with a fix would be even better. :wink:

"Beauty lies in the hands of the beer holder."
Blog.

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: mcut.cc source code and bugs

Post by adoxa » Tue Mar 28, 2017 22:27

Sorry, I'm not about to go through all the hassle of setting up a PR for a single-line change - it seems putting brackets around the shift to remove the warning is what fixed the problem. However, I don't seem to have any bad recordings atm (having deleted the test case when it worked) to actually confirm it.

User avatar
peteru
Uber Wizard
Posts: 9741
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: mcut.cc source code and bugs

Post by peteru » Tue Mar 28, 2017 22:38

OK, if creating a pull request is too much overhead and you don't have a test case, can you at least be a bit more specific about what you changed to fix the problem? Perhaps a diff of that single line change?

"Beauty lies in the hands of the beer holder."
Blog.

User avatar
adoxa
Wizard
Posts: 1490
Joined: Thu Feb 23, 2017 22:58
Location: CQ
Contact:

Re: mcut.cc source code and bugs

Post by adoxa » Tue Mar 28, 2017 23:11

Code: Select all

--- mcut.org	2017-03-11 11:43:26 +1000
+++ mcut.cc	2017-03-25 17:25:00 +1000
@@ -200,7 +200,7 @@
     if (endp)
       break;
     if (buf0[1] - buf1[1] > 45000 || buf1[1] - buf0[1] > 900000) {
-      if (absless(buf1[1] + ((long long int)1)<<33 - buf0[1], 900000))
+      if (absless(buf1[1] + (((long long int)1)<<33) - buf0[1], 900000))
 	time_offset -= ((long long int)1)<<33;
       else
 	time_offset += buf1[1] - buf0[1];
@@ -622,7 +622,7 @@
 
 int main(int argc, char* argv[])
 {
-  int f_ts, f_out, f_cuts, f_cutsout, f_ap, f_apout, f_sc, f_scout, f_meta, f_metaout, f_eit, f_eitout;
+  int f_ts, f_out, f_cuts, f_cutsout, f_ap, f_apout, f_sc, f_scout = -1, f_meta, f_metaout, f_eit, f_eitout;
   char* tmpname;
   const char* suff = 0;
   char* inname = 0;
Initialising f_scout fixes another warning, so it compiles clean with -Wall.

User avatar
peteru
Uber Wizard
Posts: 9741
Joined: Tue Jun 12, 2007 23:06
Location: Sydney, Australia
Contact:

Re: mcut.cc source code and bugs

Post by peteru » Wed Mar 29, 2017 00:34

Thanks. I applied a few more tweaks and created a pull request upstream. It was merged and I pulled it down into beyonwiz fork.

It should appear in the next beta build.

"Beauty lies in the hands of the beer holder."
Blog.

Post Reply

Return to “Developers Community”