mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
Lots of trivial tweaks to minimize compiler warnings, especially on 64-bit platform: Added missing type casts, changed types, added missing NULL checks.
This commit is contained in:
@@ -230,7 +230,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
|
||||
}
|
||||
|
||||
if (!bug->record_frame_size) {
|
||||
switch_size_t frame_size;
|
||||
uint32_t frame_size;
|
||||
switch_codec_implementation_t read_impl = { 0 };
|
||||
//switch_codec_implementation_t other_read_impl = { 0 };
|
||||
//switch_core_session_t *other_session;
|
||||
@@ -301,7 +301,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
|
||||
}
|
||||
switch_mutex_unlock(bug->read_mutex);
|
||||
} else if (fill_read) {
|
||||
frame->datalen = bytes;
|
||||
frame->datalen = (uint32_t)bytes;
|
||||
memset(frame->data, 255, frame->datalen);
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
|
||||
fp = (int16_t *) frame->data;
|
||||
rlen = frame->datalen / 2;
|
||||
wlen = datalen / 2;
|
||||
blen = bytes / 2;
|
||||
blen = (uint32_t)(bytes / 2);
|
||||
|
||||
if (switch_test_flag(bug, SMBF_STEREO)) {
|
||||
int16_t *left, *right;
|
||||
@@ -380,8 +380,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
|
||||
}
|
||||
}
|
||||
|
||||
frame->datalen = bytes;
|
||||
frame->samples = bytes / sizeof(int16_t);
|
||||
frame->datalen = (uint32_t)bytes;
|
||||
frame->samples = (uint32_t)(bytes / sizeof(int16_t));
|
||||
frame->rate = read_impl.actual_samples_per_second;
|
||||
frame->codec = NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user