Merge pull request #3104 from akallabeth/sign_mismatch_fixes
Sign mismatch warnings fixed
This commit is contained in:
commit
157d81b268
@ -489,8 +489,7 @@ static BOOL tsmf_gstreamer_set_format(ITSMFDecoder* decoder, TS_AM_MEDIA_TYPE* m
|
||||
NULL);
|
||||
break;
|
||||
case TSMF_SUB_TYPE_FLAC:
|
||||
mdecoder->gst_caps = gst_caps_new_simple("audio/x-flac",
|
||||
NULL);
|
||||
mdecoder->gst_caps = gst_caps_new_simple("audio/x-flac", "", NULL);
|
||||
break;
|
||||
default:
|
||||
WLog_ERR(TAG, "unknown format:(%d).", media_type->SubType);
|
||||
|
@ -548,6 +548,8 @@ static BOOL tsmf_sample_playback(TSMF_SAMPLE* sample)
|
||||
int index = 0;
|
||||
for (index = 0; index < count; index++)
|
||||
{
|
||||
UINT64 time_diff;
|
||||
|
||||
temp_stream = (TSMF_STREAM*) ArrayList_GetItem(presentation->stream_list, index);
|
||||
if (temp_stream->major_type == TSMF_MAJOR_TYPE_AUDIO)
|
||||
{
|
||||
@ -558,8 +560,14 @@ static BOOL tsmf_sample_playback(TSMF_SAMPLE* sample)
|
||||
if (video_time < audio_time)
|
||||
max_adjust = -VIDEO_ADJUST_MAX;
|
||||
|
||||
sample->start_time += abs(video_time - audio_time) < VIDEO_ADJUST_MAX ? (video_time - audio_time) : max_adjust;
|
||||
sample->end_time += abs(video_time - audio_time) < VIDEO_ADJUST_MAX ? (video_time - audio_time) : max_adjust;
|
||||
if (video_time > audio_time)
|
||||
time_diff = video_time - audio_time;
|
||||
else
|
||||
time_diff = audio_time - video_time;
|
||||
|
||||
time_diff = time_diff < VIDEO_ADJUST_MAX ? time_diff : max_adjust;
|
||||
sample->start_time += time_diff;
|
||||
sample->end_time += time_diff;
|
||||
|
||||
break;
|
||||
}
|
||||
@ -1215,11 +1223,11 @@ TSMF_STREAM* tsmf_stream_new(TSMF_PRESENTATION* presentation, UINT32 stream_id,
|
||||
error_add:
|
||||
SetEvent(stream->stopEvent);
|
||||
if (WaitForSingleObject(stream->ack_thread, INFINITE) == WAIT_FAILED)
|
||||
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
|
||||
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
|
||||
error_ack_thread:
|
||||
SetEvent(stream->stopEvent);
|
||||
if (WaitForSingleObject(stream->play_thread, INFINITE) == WAIT_FAILED)
|
||||
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
|
||||
WLog_ERR(TAG, "WaitForSingleObject failed with error %lu!", GetLastError());
|
||||
error_play_thread:
|
||||
Queue_Free(stream->sample_ack_list);
|
||||
error_sample_ack_list:
|
||||
|
@ -877,7 +877,7 @@ static int freerdp_tcp_connect_multi(rdpContext* context, char** hostnames,
|
||||
|
||||
sockfds[index] = _socket(addr->ai_family, addr->ai_socktype, addr->ai_protocol);
|
||||
|
||||
if (sockfds[index] < 0)
|
||||
if (sockfds[index] == INVALID_SOCKET)
|
||||
{
|
||||
freeaddrinfo(result);
|
||||
sockfds[index] = 0;
|
||||
|
@ -232,8 +232,8 @@ pstatus_t sse2_RGBToYCbCr_16s16s_P3P3(
|
||||
pDst, dstStep, roi);
|
||||
}
|
||||
|
||||
min = _mm_set1_epi16(-128 << 5);
|
||||
max = _mm_set1_epi16(127 << 5);
|
||||
min = _mm_set1_epi16(-128 * 32);
|
||||
max = _mm_set1_epi16(127 * 32);
|
||||
|
||||
r_buf = (__m128i*) (pSrc[0]);
|
||||
g_buf = (__m128i*) (pSrc[1]);
|
||||
|
@ -33,7 +33,7 @@ BOOL sf_peer_encomsp_init(testPeerContext* context)
|
||||
if (!context->encomsp)
|
||||
return FALSE;
|
||||
|
||||
if (context->encomsp->Start(context->encomsp) < 0)
|
||||
if (context->encomsp->Start(context->encomsp) != CHANNEL_RC_OK)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
|
@ -194,9 +194,6 @@ static BOOL FileWrite(PVOID Object, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrit
|
||||
if (io_status != 1)
|
||||
return FALSE;
|
||||
|
||||
if ((io_status < 0) && (errno == EWOULDBLOCK))
|
||||
io_status = 0;
|
||||
|
||||
*lpNumberOfBytesWritten = nNumberOfBytesToWrite;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -297,8 +297,8 @@ DWORD WaitForMultipleObjects(DWORD nCount, const HANDLE *lpHandles, BOOL bWaitAl
|
||||
unsigned long long diff;
|
||||
DWORD signalled;
|
||||
DWORD polled;
|
||||
DWORD *poll_map;
|
||||
BOOL *signalled_idx;
|
||||
DWORD *poll_map = NULL;
|
||||
BOOL *signalled_idx = NULL;
|
||||
int fd = -1;
|
||||
int index;
|
||||
int status;
|
||||
|
@ -323,7 +323,6 @@ BOOL WLog_AddStringLogFilters(LPCSTR filter)
|
||||
DWORD pos;
|
||||
DWORD size;
|
||||
DWORD count;
|
||||
DWORD status;
|
||||
LPSTR p;
|
||||
LPSTR filterStr;
|
||||
LPSTR cp;
|
||||
@ -365,8 +364,7 @@ BOOL WLog_AddStringLogFilters(LPCSTR filter)
|
||||
|
||||
if (pos < size)
|
||||
{
|
||||
status = WLog_ParseFilter(&g_Filters[pos++], filterStr);
|
||||
if (status < 0)
|
||||
if (!WLog_ParseFilter(&g_Filters[pos++], filterStr))
|
||||
{
|
||||
free (cp);
|
||||
return FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user