noobdoesre / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

int main() in t1_generate_luts.c breaks mplayer (and possibly others) - is it necessary? #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. using Homebrew:
2. brew install gpac (also installs openjpeg)
3. brew install mplayer
4. run mplayer

What is the expected output? What do you see instead?

Expect to see mplayer help screen, but instead see:

/* This file was automatically generated by t1_generate_luts.c */

static char lut_ctxno_zc[1024] = {
  0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 
...

What version of the product are you using? On what operating system?

1.5.0, OSX 10.7.4

Please provide any additional information below.

I was updating some applications via Homebrew (though that's not really 
relevant) and discovered a small problem caused by openjpeg.  Building gpac 
0.5.0 pulled automatically in openjpeg as a dependency (was not a dependency in 
earlier versions).  I then subsequently built mplayer 1.1, which links against 
openjpeg if available.  As a result, the main() function in t1_generate_luts.c 
becomes the entry point for the application instead of mplayer's main().  The 
problem doesn't manifest immediately in mp4box (from gpac). I think that's  
because openjpeg isn't linked from the main application as with mplayer, but 
rather from a shared library loaded on demand.  This issue is easy enough to 
work around, but I'm logging it here in case the main() function 
t1_generate_luts.c is some forgotten remnant of ad hoc testing.  It just seemed 
a little odd that a library would provide a main() function, especially one 
that doesn't do anything but print some lookup tables.

Original issue reported on code.google.com by dinkypumpkin on 18 Jun 2012 at 11:26

GoogleCodeExporter commented 9 years ago
Looks like this bug only occurs using autotools:

libopenjpeg/Makefile.am:t1_generate_luts.c

Original comment by mathieu.malaterre on 1 Oct 2012 at 4:01

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2031.

Original comment by mathieu.malaterre on 2 Oct 2012 at 7:03

GoogleCodeExporter commented 9 years ago
Thanks for the fix.  Will re-enable for mplayer when next openjpeg release 
trickles through to Homebrew.

Original comment by dinkypumpkin on 2 Oct 2012 at 11:40