[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:
parent
ef8253c495
commit
7279d24232
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue