Skip to content

Commit

Permalink
fixed msvc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Dec 21, 2023
1 parent 1234ebc commit c506ebd
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions src/compositor/hardcoded_protos.c
Expand Up @@ -1760,11 +1760,11 @@ void mesh_new_spherical_srd(GF_Mesh *mesh, Fixed radius, const GF_PropertyValue
u32 i, nb_items = srd->value.uint_list.nb_items / 8;
u32 *vals = srd->value.uint_list.vals;
for (i=0; i<nb_items; i++) {
if (orig_x < vals[8*i+4]) continue;
if (orig_x > vals[8*i+4] + vals[8*i+6]) continue;
if ((u32) orig_x < vals[8*i+4]) continue;
if ((u32) orig_x > vals[8*i+4] + vals[8*i+6]) continue;

if (orig_y < vals[8*i+5]) continue;
if (orig_y > vals[8*i+5] + vals[8*i+7]) continue;
if ((u32) orig_y < vals[8*i+5]) continue;
if ((u32) orig_y > vals[8*i+5] + vals[8*i+7]) continue;

orig_x -= vals[8*i+4]; //remove tx orig
orig_y -= vals[8*i+5]; //remove ty orig
Expand Down
2 changes: 1 addition & 1 deletion src/filters/in_rtp_stream.c
Expand Up @@ -178,7 +178,7 @@ static void rtp_sl_packet_cbk(void *udta, u8 *payload, u32 size, GF_SLHeader *hd
if (gf_rtp_is_disc(stream->rtp_ch)) {
s64 delta = stream->prev_cts + stream->min_dur_rtp;
delta -= hdr->compositionTimeStamp;
stream->ts_offset -= delta;
stream->ts_offset -= (s32) delta;

stream->prev_cts = (u32) hdr->compositionTimeStamp;
}
Expand Down
4 changes: 2 additions & 2 deletions src/filters/out_http.c
Expand Up @@ -3584,7 +3584,7 @@ static void httpout_process_session(GF_Filter *filter, GF_HTTPOutCtx *ctx, GF_HT

if (sess->comp_data) {
memcpy(sess->buffer, sess->comp_data+sess->file_pos, to_read);
read = to_read;
read = (u32) to_read;
}
else if (sess->resource) {
read = (u32) gf_fread(sess->buffer, (u32) to_read, sess->resource);
Expand All @@ -3594,7 +3594,7 @@ static void httpout_process_session(GF_Filter *filter, GF_HTTPOutCtx *ctx, GF_HT
return;
}
} else {
read = to_read;
read = (u32) to_read;
}
//transfer of file being uploaded, use chunk transfer
if (!sess->is_h2 && sess->use_chunk_transfer) {
Expand Down
2 changes: 1 addition & 1 deletion src/filters/out_route.c
Expand Up @@ -1559,7 +1559,7 @@ static void routeout_fetch_packet(GF_ROUTEOutCtx *ctx, ROUTEPid *rpid)
rpid->route->is_done = GF_TRUE;
gf_filter_pid_set_discard(rpid->pid, GF_TRUE);
}
rpid->current_toi = p->value.lfrac.num;
rpid->current_toi = (u32) p->value.lfrac.num;
} else {
p = gf_filter_pck_get_property(rpid->current_pck, GF_PROP_PCK_FILENUM);
if (p)
Expand Down
2 changes: 1 addition & 1 deletion src/ietf/rtp.c
Expand Up @@ -968,7 +968,7 @@ GF_Err gf_rtp_reorderer_add(GF_RTPReorder *po, const void * pck, u32 pck_size, u
s32 diff = ts_in;
diff-=ts_pck;
if (diff<0) diff=-diff;
if (po->TimeScale && (diff > 2*po->TimeScale)) {
if (po->TimeScale && ((u32) diff > 2*po->TimeScale)) {
cur = po->in;
while (cur->next) cur = cur->next;
cur->next = it;
Expand Down
8 changes: 4 additions & 4 deletions src/media_tools/dash_client.c
Expand Up @@ -819,21 +819,21 @@ static void gf_dash_group_timeline_setup_single(GF_MPD *mpd, GF_DASH_Group *grou
GF_MPD_SegmentTimeline *seg_timeline=NULL;
if (dyn_period->segment_template) {
startNum = dyn_period->segment_template->start_number;
segdur = dyn_period->segment_template->duration;
segdur = (u32) dyn_period->segment_template->duration;
seg_timeline = dyn_period->segment_template->segment_timeline;
pto = dyn_period->segment_template->presentation_time_offset;
timescale = dyn_period->segment_template->timescale;
}
if (set->segment_template) {
startNum = set->segment_template->start_number;
if (set->segment_template->duration) segdur = set->segment_template->duration;
if (set->segment_template->duration) segdur = (u32) set->segment_template->duration;
if (set->segment_template->segment_timeline) seg_timeline = set->segment_template->segment_timeline;
if (set->segment_template->presentation_time_offset) pto = set->segment_template->presentation_time_offset;
if (set->segment_template->timescale) timescale = set->segment_template->timescale;
}
if (rep->segment_template) {
startNum = rep->segment_template->start_number;
if (rep->segment_template->duration) segdur = rep->segment_template->duration;
if (rep->segment_template->duration) segdur = (u32) rep->segment_template->duration;
if (rep->segment_template->segment_timeline) seg_timeline = rep->segment_template->segment_timeline;
if (rep->segment_template->presentation_time_offset) pto = rep->segment_template->presentation_time_offset;
if (rep->segment_template->timescale) timescale = rep->segment_template->timescale;
Expand Down Expand Up @@ -2066,7 +2066,7 @@ static u32 gf_dash_purge_segment_timeline(GF_DASH_Group *group, Double min_start
if (nb_removed) {
GF_MPD_SegmentList *segment_list;
/*update next download index*/
gf_fatal_assert(group->download_segment_index >= nb_removed);
gf_fatal_assert(group->download_segment_index >= (s32) nb_removed);
group->download_segment_index -= nb_removed;
gf_fatal_assert(group->nb_segments_in_rep >= nb_removed);
group->nb_segments_in_rep -= nb_removed;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/os_net.c
Expand Up @@ -1269,7 +1269,7 @@ GF_Err gf_netcap_setup(char *rules)
u32 pck_end=0;
s32 patch_offset=-1;
s32 patch_val=-1;
u32 rand_every = 0;
s32 rand_every = 0;
char *rule_str;
char *sep = strchr(rules, '[');
if (!sep) break;
Expand Down Expand Up @@ -3556,7 +3556,7 @@ GF_Err gf_sk_receive_internal(GF_Socket *sock, char *buffer, u32 length, u32 *By

if (sock!=nf->read_sock_selected) return GF_IP_NETWORK_EMPTY;
u32 to_read = length;
if (to_read > nf->pck_len) to_read = nf->pck_len;
if ((s32) to_read > nf->pck_len) to_read = nf->pck_len;
u32 res = gf_bs_read_data(nf->cap_bs, buffer, to_read);
if (nf->read_sock_selected->cap_info->patch_offset) {
if (nf->read_sock_selected->cap_info->patch_offset-1<res) {
Expand Down

0 comments on commit c506ebd

Please sign in to comment.