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
This commit is contained in:
Jacob Erlbeck 2013-12-18 12:43:18 +01:00 committed by Holger Hans Peter Freyther
parent daf2a38eb6
commit eddaa9f19e
1 changed files with 3 additions and 1 deletions

View File

@ -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),