[trunk] Import commit 8ec8321df613986e8642e2975f7182072eb4be62 from ghostpdl
make opj_stream_set_user_data accept a NULL stream for consistency with opj_stream_set_* which does so. Update issue 225
This commit is contained in:
parent
876c02206d
commit
6145c82804
|
@ -256,12 +256,16 @@ void OPJ_CALLCONV opj_stream_set_skip_function(opj_stream_t* p_stream, opj_strea
|
||||||
void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t* p_stream, void * p_data)
|
void OPJ_CALLCONV opj_stream_set_user_data(opj_stream_t* p_stream, void * p_data)
|
||||||
{
|
{
|
||||||
opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream;
|
opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream;
|
||||||
|
if (!l_stream)
|
||||||
|
return;
|
||||||
l_stream->m_user_data = p_data;
|
l_stream->m_user_data = p_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t* p_stream, OPJ_UINT64 data_length)
|
void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t* p_stream, OPJ_UINT64 data_length)
|
||||||
{
|
{
|
||||||
opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream;
|
opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream;
|
||||||
|
if (!l_stream)
|
||||||
|
return;
|
||||||
l_stream->m_user_data_length = data_length;
|
l_stream->m_user_data_length = data_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue