summaryrefslogtreecommitdiffstats
path: root/stream/stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream.h')
-rw-r--r--stream/stream.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/stream/stream.h b/stream/stream.h
index c423d70096..8bd8ecfc01 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -30,10 +30,6 @@
#define STREAM_BUFFER_SIZE 2048
-// Max buffer for initial probe.
-#define STREAM_MAX_BUFFER_SIZE (2 * 1024 * 1024)
-
-
// stream->mode
#define STREAM_READ 0
#define STREAM_WRITE 1
@@ -123,8 +119,10 @@ typedef struct stream {
// added to this. The user can reset this as needed.
uint64_t total_unbuffered_read_bytes;
- // Includes additional padding in case sizes get rounded up by sector size.
- unsigned char buffer[];
+ uint8_t *buffer;
+
+ int buffer_alloc;
+ uint8_t buffer_inline[STREAM_BUFFER_SIZE];
} stream_t;
int stream_fill_buffer(stream_t *s);