We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2740beb commit 682113cCopy full SHA for 682113c
src/c2pa/c2pa.py
@@ -1107,9 +1107,14 @@ def flush_callback(ctx):
1107
self._write_cb = WriteCallback(write_callback)
1108
self._flush_cb = FlushCallback(flush_callback)
1109
1110
+ # Create a placeholder context as we don't actually use the context,
1111
+ # but we need having a valid context pointer. Therefore, we create
1112
+ # a small buffer and cast it to a StreamContext pointer
1113
+ self._context = ctypes.create_string_buffer(1)
1114
+
1115
# Create the stream
1116
self._stream = _lib.c2pa_create_stream(
- None, # context
1117
+ ctypes.cast(self._context, ctypes.POINTER(StreamContext)),
1118
self._read_cb,
1119
self._seek_cb,
1120
self._write_cb,
0 commit comments