[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:
Holger Hans Peter Freyther 2010-04-06 11:15:50 +02:00
parent ef8253c495
commit 7279d24232
1 changed files with 3 additions and 0 deletions

View File

@ -90,6 +90,9 @@ static void patch_payload(int payload, char *data, int len)
if (len < sizeof(*rtp_hdr))
return;
if (payload < 0)
return;
rtp_hdr = (struct rtp_hdr *) data;
rtp_hdr->payload_type = payload;
}