rtp: Avoid memcpy(len=0)
Change-Id: I7618c6509b67465d21271ea632bccc8cf11e4852
This commit is contained in:
parent
e95ad0e66e
commit
c8241421bc
|
@ -199,7 +199,8 @@ osmo_rtp_build(struct osmo_rtp_handle *h, uint8_t payload_type,
|
|||
rtph->timestamp = htonl(h->tx.timestamp);
|
||||
h->tx.timestamp += duration;
|
||||
rtph->ssrc = htonl(h->tx.ssrc);
|
||||
memcpy(msg->data + sizeof(struct rtp_hdr), data, payload_len);
|
||||
if (payload_len > 0)
|
||||
memcpy(msg->data + sizeof(struct rtp_hdr), data, payload_len);
|
||||
msgb_put(msg, sizeof(struct rtp_hdr) + payload_len);
|
||||
|
||||
return msg;
|
||||
|
|
Loading…
Reference in New Issue