[vlc-commits] access_out: rist: fix BAD_SHIFT warning
Sergio Ammirata
git at videolan.org
Fri Dec 7 09:50:05 CET 2018
vlc | branch: master | Sergio Ammirata <sergio at ammirata.net> | Tue Nov 27 07:57:49 2018 -0500| [7a2bd115d7ef392d4b8e0fea2d971ddbfbf29a8b] | committer: Thomas Guillem
access_out: rist: fix BAD_SHIFT warning
Happening on win32 builds (tv.tv_usec is 32 bits there).
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7a2bd115d7ef392d4b8e0fea2d971ddbfbf29a8b
---
modules/access_output/rist.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/access_output/rist.c b/modules/access_output/rist.c
index 1e36b963c5..17929d0050 100644
--- a/modules/access_output/rist.c
+++ b/modules/access_output/rist.c
@@ -338,7 +338,9 @@ static void rist_rtcp_send(sout_access_out_t *p_access)
rtcp_sr_set_length(p_sr, 6);
rtcp_fb_set_int_ssrc_pkt_sender(p_sr, p_sys->ssrc);
rtcp_sr_set_ntp_time_msw(p_sr, tv.tv_sec + SEVENTY_YEARS_OFFSET);
- fractions = (tv.tv_usec << 32ULL) / 1000000ULL;
+ fractions = (uint64_t)tv.tv_usec;
+ fractions <<= 32ULL;
+ fractions /= 1000000ULL;
rtcp_sr_set_ntp_time_lsw(p_sr, (uint32_t)fractions);
rtcp_sr_set_rtp_time(p_sr, rtp_get_ts(vlc_tick_now()));
vlc_mutex_lock( &p_sys->lock );
More information about the vlc-commits
mailing list