aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-02-19 16:14:32 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2013-02-19 16:14:32 +0100
commite0ae0d25c031ba6f5e634d0b09fa81422f201aeb (patch)
tree4d4ba134100a54a15b638d736206941052ab3ac6 /src
parent5cbdd8797a157926aaaaa78f14a424cf8f77eacc (diff)
osmux: RTP payload type for voice is dynamic
Don't make any assumption on the payload type.
Diffstat (limited to 'src')
-rw-r--r--src/osmux.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/osmux.c b/src/osmux.c
index 48943eb..d2dce87 100644
--- a/src/osmux.c
+++ b/src/osmux.c
@@ -381,7 +381,12 @@ int osmux_xfrm_input(struct osmux_in_handle *h, struct msgb *msg, int ccid)
switch(rtph->payload_type) {
case RTP_PT_RTCP:
return 0;
- case RTP_PT_AMR:
+ default:
+ /* The RTP payload type is dynamically allocated,
+ * although we use static ones. Assume that we always
+ * receive AMR traffic.
+ */
+
/* This is the first message in the batch, start the
* batch timer to deliver it.
*/
@@ -394,10 +399,6 @@ int osmux_xfrm_input(struct osmux_in_handle *h, struct msgb *msg, int ccid)
}
ret = osmux_batch_add(batch, msg, ccid);
break;
- default:
- /* Only AMR supported so far, sorry. */
- ret = 0;
- break;
}
return ret;
}