Commit 65ede0b5 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠

rtpulpfec: don't use non-portable notation for 64-bit int constants

Use GLib macro instead, even if it's a bit unwieldy.
parent c21765e8
......@@ -336,7 +336,7 @@ gst_rtp_ulpfec_dec_recover (GstRtpUlpFecDec * self, guint32 ssrc, gint media_pt,
/* Is it the only 1 in the mask? Checking if we lacking single packet in
* that case FEC packet can be used for recovery */
if (missing_packets_mask == (1ULL << trailing_zeros)) {
if (missing_packets_mask == (G_GUINT64_CONSTANT (1) << trailing_zeros)) {
GstBuffer *ret;
*dst_seq =
......
......@@ -224,7 +224,7 @@ gst_rtp_ulpfec_enc_stream_ctx_protect (GstRtpUlpFecEncStreamCtx * ctx,
}
}
g_assert (tmp_mask == 0ULL);
g_assert (tmp_mask == 0);
ret =
rtp_ulpfec_bitstring_to_fec_rtp_buffer (ctx->scratch_buf, seq_base,
fec_mask_long, fec_mask, FALSE, pt, seq, timestamp, ssrc);
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment