module-rtp: Fix rtp timestamps

Because of operator precedence the timestamps where set to 0 if
set_timestamp was 0.
This commit is contained in:
Jonas Holmberg 2024-10-23 16:08:36 +02:00
parent 7906dc854a
commit 6223715918

View file

@ -250,8 +250,7 @@ static void rtp_audio_flush_packets(struct impl *impl, uint32_t num_packets, uin
else
header.m = 0;
header.sequence_number = htons(impl->seq);
header.timestamp = htonl(impl->ts_offset + timestamp);
header.timestamp = htonl(impl->ts_offset + set_timestamp ? set_timestamp : timestamp);
header.timestamp = htonl(impl->ts_offset + (set_timestamp ? set_timestamp : timestamp));
set_iovec(&impl->ring,
impl->buffer, BUFFER_SIZE,