36#define INPUT_BUF_SIZE 4096
105 if (
src->start_of_file)
106 ERREXIT(cinfo, JERR_INPUT_EMPTY);
107 WARNMS(cinfo, JWRN_JPEG_EOF);
114 src->pub.next_input_byte =
src->buffer;
115 src->pub.bytes_in_buffer = nbytes;
124 static const JOCTET mybuffer[4] = {
132 WARNMS(cinfo, JWRN_JPEG_EOF);
136 cinfo->src->next_input_byte = mybuffer;
137 cinfo->src->bytes_in_buffer = 2;
166 nbytes = (
size_t) num_bytes;
167 while (nbytes >
src->bytes_in_buffer) {
169 (
void) (*
src->fill_input_buffer) (cinfo);
174 src->next_input_byte += nbytes;
175 src->bytes_in_buffer -= nbytes;
223 if (cinfo->src ==
NULL) {
227 src->buffer = (
JOCTET *) (*cinfo->mem->alloc_small)
238 src->pub.bytes_in_buffer = 0;
239 src->pub.next_input_byte =
NULL;
255 ERREXIT(cinfo, JERR_INPUT_EMPTY);
261 if (cinfo->src ==
NULL) {
term_source(j_decompress_ptr cinfo)
jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *inbuffer, size_t insize)
my_source_mgr * my_src_ptr
jpeg_stdio_src(j_decompress_ptr cinfo, FILE *infile)
fill_input_buffer(j_decompress_ptr cinfo)
init_mem_source(j_decompress_ptr cinfo)
fill_mem_input_buffer(j_decompress_ptr cinfo)
init_source(j_decompress_ptr cinfo)
skip_input_data(j_decompress_ptr cinfo, long num_bytes)
jpeg_resync_to_restart(j_decompress_ptr cinfo, int desired)
#define WARNMS(cinfo, code)
#define JFREAD(file, buf, sizeofbuf)
struct jpeg_common_struct * j_common_ptr
const unsigned char * inbuffer
const unsigned char size_t insize