diff options
-rw-r--r-- | src/trau/osmo_ortp.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/trau/osmo_ortp.c b/src/trau/osmo_ortp.c index f918b4a..5117a2c 100644 --- a/src/trau/osmo_ortp.c +++ b/src/trau/osmo_ortp.c @@ -420,23 +420,9 @@ int osmo_rtp_socket_connect(struct osmo_rtp_socket *rs, const char *ip, uint16_t int osmo_rtp_send_frame(struct osmo_rtp_socket *rs, const uint8_t *payload, unsigned int payload_len, unsigned int duration) { - mblk_t *mblk; - int rc; - - mblk = rtp_session_create_packet(rs->sess, RTP_FIXED_HEADER_SIZE, - payload, payload_len); - if (!mblk) - return -ENOMEM; - - rc = rtp_session_sendm_with_ts(rs->sess, mblk, - rs->tx_timestamp); + int rc = rtp_session_send_with_ts(rs->sess, payload, payload_len, + rs->tx_timestamp); rs->tx_timestamp += duration; - if (rc < 0) { - /* no need to free() the mblk, as rtp_session_rtp_send() - * unconditionally free()s the mblk even in case of - * error */ - return rc; - } return rc; } |