Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[git/2.1 regression] Fix opj_write_tile() failure when numresolutions=1 #690

Merged

Commits on Jan 8, 2016

  1. [git/2.1 regression] Fix opj_write_tile() failure when numresolutions=1

    When trying the GDAL OpenJPEG driver against openjpeg current master HEAD,
    I get failures when trying to create .jp2 files. The driver uses
    opj_write_tile() and in some tests numresolutions = 1.
    
    In openjp2/dwt.c:410, l_data_size = opj_dwt_max_resolution( tilec->resolutions,tilec->numresolutions) * (OPJ_UINT32)sizeof(OPJ_INT32);
    is called and returns l_data_size = 0. Now in git opj_malloc() has a special case
    for 0 to return a NULL pointer whereas previously it relied on system malloc(),
    which in my case didn't return NULL.
    
    So only test the pointer value if l_data_size != 0. This makes the GDAL
    autotest suite to pass again.
    rouault committed Jan 8, 2016
    Configuration menu
    Copy the full SHA
    87c0d7d View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2016

  1. Configuration menu
    Copy the full SHA
    6a1974d View commit details
    Browse the repository at this point in the history