mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 21:13:44 +00:00
[mgcp] Do not patch RTP payload when type is set to -1.
For the nat we might or might not want to patch it, do not patch if we have no valid rtp payload type.
This commit is contained in:
@@ -90,6 +90,9 @@ static void patch_payload(int payload, char *data, int len)
|
|||||||
if (len < sizeof(*rtp_hdr))
|
if (len < sizeof(*rtp_hdr))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (payload < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
rtp_hdr = (struct rtp_hdr *) data;
|
rtp_hdr = (struct rtp_hdr *) data;
|
||||||
rtp_hdr->payload_type = payload;
|
rtp_hdr->payload_type = payload;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user