summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/openjpeg.h
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-25 10:23:40 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2014-03-25 10:23:40 +0000
commit492d8ab7d9dbe9b850cf8c7a9930189a1e864c66 (patch)
tree8d6e112aa5099f713cc9ca821550bc2bd26a8d89 /src/lib/openjp2/openjpeg.h
parent2b93727bea45406118bf6110aa8e725dc6d9f68b (diff)
[trunk] Rework previous commit r2610
This way we are able to gently deprecate the old API, and preserve ABI Update issue 306
Diffstat (limited to 'src/lib/openjp2/openjpeg.h')
-rw-r--r--src/lib/openjp2/openjpeg.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h
index 1ea2af80..466d07fd 100644
--- a/src/lib/openjp2/openjpeg.h
+++ b/src/lib/openjp2/openjpeg.h
@@ -1071,9 +1071,17 @@ OPJ_API void OPJ_CALLCONV opj_stream_set_seek_function(opj_stream_t* p_stream, o
* Sets the given data to be used as a user data for the stream.
* @param p_stream the stream to modify
* @param p_data the data to set.
+ * @warning depending on your source object p_stream this function may leak, use opj_stream_set_user_data_v3
+*/
+OPJ_DEPRECATED(OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data));
+
+/**
+ * Sets the given data to be used as a user data for the stream.
+ * @param p_stream the stream to modify
+ * @param p_data the data to set.
* @param p_function the function to free p_data when opj_stream_destroy() is called.
*/
-OPJ_API void OPJ_CALLCONV opj_stream_set_user_data (opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function);
+OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_v3 (opj_stream_t* p_stream, void * p_data, opj_stream_free_user_data_fn p_function);
/**
* Sets the length of the user data for the stream.