rtp: Update codes based on 1.18.4
[platform/upstream/gst-plugins-good.git] / gst / rtp / rtpulpfeccommon.c
index 9bca5df..7c6bf58 100644 (file)
@@ -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));