X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Frtp%2Frtpulpfeccommon.c;h=7c6bf5876bc5ef6be23f32ec31b0c0b91df90cba;hb=refs%2Ftags%2Fsubmit%2Ftizen%2F20210423.074026;hp=9bca5df66934c6eec47665be4011116a775c0886;hpb=3789afd491916103969ac26daaf40e7ceac27993;p=platform%2Fupstream%2Fgst-plugins-good.git diff --git a/gst/rtp/rtpulpfeccommon.c b/gst/rtp/rtpulpfeccommon.c index 9bca5df..7c6bf58 100644 --- a/gst/rtp/rtpulpfeccommon.c +++ b/gst/rtp/rtpulpfeccommon.c @@ -161,14 +161,17 @@ rtp_ulpfec_get_headers_len (gboolean fec_mask_long) return sizeof (RtpUlpFecHeader) + fec_level_hdr_get_size (fec_mask_long); } +#define ONE_64BIT G_GUINT64_CONSTANT(1) + guint64 rtp_ulpfec_packet_mask_from_seqnum (guint16 seq, guint16 fec_seq_base, gboolean fec_mask_long) { gint seq_delta = gst_rtp_buffer_compare_seqnum (fec_seq_base, seq); if (seq_delta >= 0 - && seq_delta <= RTP_ULPFEC_SEQ_BASE_OFFSET_MAX (fec_mask_long)) - return 1ULL << (RTP_ULPFEC_SEQ_BASE_OFFSET_MAX (TRUE) - seq_delta); + && seq_delta <= RTP_ULPFEC_SEQ_BASE_OFFSET_MAX (fec_mask_long)) { + return ONE_64BIT << (RTP_ULPFEC_SEQ_BASE_OFFSET_MAX (TRUE) - seq_delta); + } return 0; } @@ -355,7 +358,7 @@ rtp_ulpfec_map_info_map (GstBuffer * buffer, RtpUlpFecMapInfo * info) * @info: #RtpUlpFecMapInfo * * Unmap @info previously mapped with rtp_ulpfec_map_info_map() and unrefs the - * buffer. For convinience can even be called even if rtp_ulpfec_map_info_map + * buffer. For convenience can even be called even if rtp_ulpfec_map_info_map * returned FALSE **/ void @@ -430,7 +433,7 @@ rtp_ulpfec_log_fec_packet (GstDebugCategory * cat, GstDebugLevel level, fec_level_hdr = fec_hdr_get_level_hdr (fec_hdr); GST_CAT_LEVEL_LOG (cat, level, object, - "%-22s: protection_len=%u mask=0x%012lx", + "%-22s: protection_len=%u mask=0x%012" G_GINT64_MODIFIER "x", "fec level header", g_ntohs (fec_level_hdr->protection_len), fec_level_hdr_get_mask (fec_level_hdr, fec_hdr->L));