aboutsummaryrefslogtreecommitdiffstats
path: root/examples/rtp-udp-test-client.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rtp-udp-test-client.c')
-rw-r--r--examples/rtp-udp-test-client.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/rtp-udp-test-client.c b/examples/rtp-udp-test-client.c
index 4163703..97ec6ff 100644
--- a/examples/rtp-udp-test-client.c
+++ b/examples/rtp-udp-test-client.c
@@ -39,7 +39,7 @@ static struct osmo_rtp_handle *rtp;
static int read_cb(struct osmo_dgram_conn *conn)
{
struct msgb *msg;
- int payload_type;
+ struct rtp_hdr *rtph;
LOGP(DLINP, LOGL_DEBUG, "received message\n");
@@ -53,15 +53,16 @@ static int read_cb(struct osmo_dgram_conn *conn)
LOGP(DRTP_TEST, LOGL_ERROR, "cannot receive message\n");
return -1;
}
- payload_type = osmo_rtp_parse(msg);
- if (payload_type < 0) {
+
+ rtph = osmo_rtp_get_hdr(msg);
+ if (rtph == NULL) {
msgb_free(msg);
LOGP(DRTP_TEST, LOGL_ERROR, "cannot parse RTP message\n");
return -1;
}
- LOGP(DLINP, LOGL_DEBUG, "received message with payload type: %d "
- "and size: %d (%s)\n", payload_type, msg->len, msg->data);
+ LOGP(DLINP, LOGL_DEBUG, "received message with payload type: %d\n",
+ rtph->payload_type);
msgb_free(msg);
return 0;