Commit 415afb96 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

Mimic return value for full output buffer.

parent 7d890ee5
......@@ -107,6 +107,7 @@ int SZ_BufftoBuffCompress(void *dest, size_t *destLen,
{
struct aec_stream strm;
int status;
int aec_status;
void *padbuf;
void *buf;
size_t padding_size;
......@@ -166,7 +167,11 @@ int SZ_BufftoBuffCompress(void *dest, size_t *destLen,
strm.avail_in = sourceLen;
}
status = aec_buffer_encode(&strm);
aec_status = aec_buffer_encode(&strm);
if (aec_status == AEC_STREAM_ERROR)
status = SZ_OUTBUFF_FULL;
else
status = aec_status;
*destLen = strm.total_out;
CLEANUP:
......
......@@ -12,10 +12,11 @@
#define SZ_RAW_OPTION_MASK 128
#define SZ_OK AEC_OK
#define SZ_OUTBUFF_FULL 2
#define SZ_NO_ENCODER_ERROR -1
#define SZ_PARAM_ERROR AEC_CONF_ERROR
#define SZ_MEM_ERROR AEC_MEM_ERROR
#define SZ_OUTBUFF_FULL AEC_STREAM_ERROR
#define SZ_MAX_PIXELS_PER_BLOCK 32
#define SZ_MAX_BLOCKS_PER_SCANLINE 128
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment