[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:
Mathieu Malaterre 2014-02-25 13:33:43 +00:00
parent 876c02206d
commit 6145c82804
1 changed files with 4 additions and 0 deletions

View File

@ -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)
{
opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream;
if (!l_stream)
return;
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)
{
opj_stream_private_t* l_stream = (opj_stream_private_t*) p_stream;
if (!l_stream)
return;
l_stream->m_user_data_length = data_length;
}