summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-12-18 12:43:18 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-18 16:16:42 +0100
commiteddaa9f19e6894cc2aa4caedb9530348c8210d0f (patch)
tree33cc558b78531d0b0d7b242a5b961c9fd3d8241a
parentdaf2a38eb6ac143ade53e115f09ba1b8beb63ba8 (diff)
contrib/rtp: Fix default payload case
There is the wrong record field selection being used to extract the default value. It returns the tuple offset instead of the value. This patch fixes this. Sponsored-by: On-Waves ehf
-rwxr-xr-xopenbsc/contrib/rtp/gen_rtp_header.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/contrib/rtp/gen_rtp_header.erl b/openbsc/contrib/rtp/gen_rtp_header.erl
index 9f980b037..cc4c61c58 100755
--- a/openbsc/contrib/rtp/gen_rtp_header.erl
+++ b/openbsc/contrib/rtp/gen_rtp_header.erl
@@ -45,7 +45,9 @@ main([First | RemArgs], Opts) ->
InFile = proplists:get_value(file, Opts, undef),
Payload = case {PayloadData, InFile} of
- {undef, undef} -> #rtp_packet.payload;
+ {undef, undef} ->
+ % use default value
+ #rtp_packet{}#rtp_packet.payload;
{P, undef} -> P;
{_, File} ->
log(info, "Loading file '~s'~n", [File], Opts),