Fix code-style and merge duplicate if block.

This commit is contained in:
Robert G. Jakabosky 2022-01-29 22:56:26 +08:00
parent f4088f9a74
commit 2abbcb9ef7
No known key found for this signature in database
GPG Key ID: 0C38AF433FE0B1C0
4 changed files with 15 additions and 14 deletions

View File

@ -433,7 +433,8 @@ OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
return OPJ_FALSE;
}
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, OPJ_BOOL strict)
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,
OPJ_BOOL strict)
{
if (p_codec) {
opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec;
@ -444,7 +445,8 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,
return OPJ_FALSE;
}
l_codec->m_codec_data.m_decompression.opj_decoder_set_strict_mode(l_codec->m_codec,
l_codec->m_codec_data.m_decompression.opj_decoder_set_strict_mode(
l_codec->m_codec,
strict);
return OPJ_TRUE;
}

View File

@ -1356,7 +1356,8 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
* @return true if the decoder is correctly set
*/
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec, OPJ_BOOL strict);
OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,
OPJ_BOOL strict);
/**
* Allocates worker threads for the compressor/decompressor.

View File

@ -1447,8 +1447,6 @@ static OPJ_BOOL opj_t2_read_packet_data(opj_t2_t* p_t2,
if (l_cblk->numnewpasses > 0) {
++l_seg;
++l_cblk->numsegs;
}
if(l_cblk->numnewpasses > 0) {
break;
}
continue;