Commit 91261e52 authored by Christian Beier's avatar Christian Beier

Merge pull request #49 from maxnet/master

Fix libva related compile errors
parents 53becab9 aaee22aa
......@@ -588,7 +588,7 @@ static void GtkDefaultLog (const char *format, ...)
time (&log_clock);
strftime (buf, 255, "%d/%m/%Y %X ", localtime (&log_clock));
fprintf (stdout, buf);
fprintf (stdout, "%s", buf);
vfprintf (stdout, format, args);
fflush (stdout);
......
......@@ -150,12 +150,11 @@ AM_CONDITIONAL(HAVE_LIBSSL, test ! -z "$SSL_LIBS")
# See if we want libva support
# TODO: check if library actually exists
AH_TEMPLATE(CONFIG_LIBVA, [Build libva support])
AC_ARG_WITH(libva,
[ --with-libva build libva support],,)
[ --without-libva disable support for libva],,)
if test "x$with_libva" != "xno"; then
AC_CHECK_LIB(va, vaInitialize,
AC_CHECK_LIB(va-x11, vaGetDisplay,
VA_LIBS="-lva -lva-x11"
[AC_DEFINE(CONFIG_LIBVA) CONFIG_LIBVA="true"], ,)
fi
......
......@@ -20,6 +20,10 @@
#ifdef LIBVNCSERVER_CONFIG_LIBVA
#include <X11/Xlib.h>
#include <va/va_version.h>
#if VA_CHECK_VERSION(0,34,0)
#include <va/va_compat.h>
#endif
#include <va/va_x11.h>
enum _slice_types {
......
......@@ -198,7 +198,7 @@ HandleZRLE (rfbClient* client, int rx, int ry, int rw, int rh)
for(i=0; i<rw; i+=rfbZRLETileWidth) {
int subWidth=(i+rfbZRLETileWidth>rw)?rw-i:rfbZRLETileWidth;
int subHeight=(j+rfbZRLETileHeight>rh)?rh-j:rfbZRLETileHeight;
int result=HandleZRLETile(client,buf,remaining,rx+i,ry+j,subWidth,subHeight);
int result=HandleZRLETile(client,(uint8_t *)buf,remaining,rx+i,ry+j,subWidth,subHeight);
if(result<0) {
rfbClientLog("ZRLE decoding failed (%d)\n",result);
......
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