Fixed compilation failure when zlib is not available
This commit is contained in:
parent
3dbef94b04
commit
e12a9dc408
|
@ -1257,15 +1257,19 @@ bool EventStream::sendFrame( int delta_us )
|
||||||
case STREAM_JPEG :
|
case STREAM_JPEG :
|
||||||
send_image->EncodeJpeg( img_buffer, &img_buffer_size );
|
send_image->EncodeJpeg( img_buffer, &img_buffer_size );
|
||||||
break;
|
break;
|
||||||
case STREAM_RAW :
|
|
||||||
img_buffer = (uint8_t*)(send_image->Buffer());
|
|
||||||
img_buffer_size = send_image->Size();
|
|
||||||
break;
|
|
||||||
case STREAM_ZIP :
|
case STREAM_ZIP :
|
||||||
|
#if HAVE_ZLIB_H
|
||||||
unsigned long zip_buffer_size;
|
unsigned long zip_buffer_size;
|
||||||
send_image->Zip( img_buffer, &zip_buffer_size );
|
send_image->Zip( img_buffer, &zip_buffer_size );
|
||||||
img_buffer_size = zip_buffer_size;
|
img_buffer_size = zip_buffer_size;
|
||||||
break;
|
break;
|
||||||
|
#else
|
||||||
|
Error("zlib is required for zipped images. Falling back to raw image");
|
||||||
|
#endif // HAVE_ZLIB_H
|
||||||
|
case STREAM_RAW :
|
||||||
|
img_buffer = (uint8_t*)(send_image->Buffer());
|
||||||
|
img_buffer_size = send_image->Size();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Fatal( "Unexpected frame type %d", type );
|
Fatal( "Unexpected frame type %d", type );
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue