Add offset to replay_rate to make it unsigned
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2708 e3e1d417-86f3-4887-817a-d78f3d33393fpull/27/merge
parent
5d766dde92
commit
f2ad7cc770
|
@ -25,6 +25,7 @@
|
|||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
#include <getopt.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <glob.h>
|
||||
|
||||
#include "zm.h"
|
||||
|
@ -836,7 +837,7 @@ void EventStream::processCommand( const CmdMsg *msg )
|
|||
// Clear paused flag
|
||||
paused = false;
|
||||
}
|
||||
replay_rate = (signed short)ntohs(((unsigned char)msg->msg_data[1]<<8)|(unsigned char)msg->msg_data[2]);
|
||||
replay_rate = ntohs(((unsigned char)msg->msg_data[2]<<8)|(unsigned char)msg->msg_data[1])-32768;
|
||||
break;
|
||||
}
|
||||
case CMD_STOP :
|
||||
|
|
|
@ -2788,7 +2788,7 @@ void MonitorStream::processCommand( const CmdMsg *msg )
|
|||
// Set delayed_play flag
|
||||
delayed = true;
|
||||
}
|
||||
replay_rate = (signed short)ntohs(((unsigned char)msg->msg_data[1]<<8)|(unsigned char)msg->msg_data[2]);
|
||||
replay_rate = ntohs(((unsigned char)msg->msg_data[2]<<8)|(unsigned char)msg->msg_data[1])-32768;
|
||||
break;
|
||||
}
|
||||
case CMD_STOP :
|
||||
|
|
|
@ -22,7 +22,7 @@ switch ( $_REQUEST['command'] )
|
|||
{
|
||||
case CMD_VARPLAY :
|
||||
//error_log( "Varplaying to ".$_REQUEST['rate'] );
|
||||
$msg = pack( "lcn", MSG_CMD, $_REQUEST['command'], $_REQUEST['rate']-32768 );
|
||||
$msg = pack( "lcn", MSG_CMD, $_REQUEST['command'], $_REQUEST['rate']+32768 );
|
||||
break;
|
||||
case CMD_ZOOMIN :
|
||||
//error_log( "Zooming to ".$_REQUEST['x'].",".$_REQUEST['y'] );
|
||||
|
|
Loading…
Reference in New Issue