Reputation: 372
I've a problem with just this sample of code :
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_decompress(&cinfo);
My program exits on jpeg_create_decompress
without error message. Any one have an idea ?
Upvotes: 1
Views: 2212
Reputation: 372
I found the solution !
On Android, there is already a libjpeg.so installed and it appears it is loaded in priority. This one seems to be configured differently. So, you have to rename your shared library libjpeg into a different name.
For me, i renamed from libjpeg.so to libmyjpeg.so.
Upvotes: 3
Reputation: 69632
You should have been doing:
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
cinfo.err = jpeg_std_error(&jerr); // <<-- cinfo here!
jpeg_create_decompress(&cinfo);
Upvotes: 1