diff options
| author | mayeut <mayeut@users.noreply.github.com> | 2015-10-02 22:33:44 +0200 |
|---|---|---|
| committer | mayeut <mayeut@users.noreply.github.com> | 2015-10-02 22:33:44 +0200 |
| commit | db23831d573cd5bd8ecb56040af7be7c5887fd28 (patch) | |
| tree | 089e73ceb27e25fa5a8052caa98d1c17093be9fb /src | |
| parent | cf352af089bd6adc89130fa839c57779e4870e6f (diff) | |
Add check for seek support before trying TPsot==TNsot workaround
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/openjp2/j2k.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index e612d06e..291c9b77 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -7682,6 +7682,11 @@ static OPJ_BOOL opj_j2k_need_nb_tile_parts_correction(opj_stream_private_t *p_st /* initialize to no correction needed */ *p_correction_needed = OPJ_FALSE; + if (!opj_stream_has_seek(p_stream)) { + /* We can't do much in this case, seek is needed */ + return OPJ_TRUE; + } + l_stream_pos_backup = opj_stream_tell(p_stream); if (l_stream_pos_backup == -1) { /* let's do nothing */ |
