Skip to content

Commit

Permalink
MT#56861 fix RTP header pointer
Browse files Browse the repository at this point in the history
When we're duplicating the packet contents, we must also update the RTP
header pointer accordingly.

Fixup for fa819e3

Change-Id: I66117b2ad15a9adfaabaa1dbc67179bb1817f5e9
  • Loading branch information
rfuchs committed Jul 6, 2023
1 parent 850a1a5 commit 205f03d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daemon/codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,8 @@ static void codec_add_raw_packet_common(struct media_packet *mp, unsigned int cl
if (mp->rtp && mp->ssrc_out) {
ssrc_ctx_hold(mp->ssrc_out);
p->ssrc_out = mp->ssrc_out;
p->rtp = mp->rtp;
if (!p->rtp)
p->rtp = mp->rtp;
}
g_queue_push_tail(&mp->packets_out, p);
}
Expand All @@ -1640,6 +1641,7 @@ static void codec_add_raw_packet_dup(struct media_packet *mp, unsigned int clock
struct codec_packet *p = g_slice_alloc0(sizeof(*p));
str_init_dup_str(&p->s, &mp->raw);
p->free_func = free;
p->rtp = (struct rtp_header *) p->s.s;
codec_add_raw_packet_common(mp, clockrate, p);
}
static bool handler_silence_block(struct codec_handler *h, struct media_packet *mp) {
Expand Down

0 comments on commit 205f03d

Please sign in to comment.