Ejemplo n.º 1
0
static void skip_input_data(struct jpeg_decompress_struct *cinfo, long num_bytes)
{
	struct my_source_mgr* src = (void*)cinfo->src;
	off_t ret;

	GP_DEBUG(3, "Skipping %li bytes", num_bytes);

	if (src->mgr.bytes_in_buffer < (unsigned long)num_bytes) {
		ret = GP_IOSeek(src->io, num_bytes - src->mgr.bytes_in_buffer, GP_IO_SEEK_CUR);
		//TODO: Call jpeg error
		if (ret == (off_t)-1)
			GP_FATAL("Failed to skip data: %s", strerror(errno));
		src->mgr.bytes_in_buffer = 0;
	} else {
		src->mgr.bytes_in_buffer -= num_bytes;
		src->mgr.next_input_byte += num_bytes;
	}
}
Ejemplo n.º 2
0
gp_container *gp_open_zip(const char GP_UNUSED(*path))
{
	GP_FATAL("zlib support not compiled in");
	errno = ENOSYS;
	return NULL;
}