Commit 66edb91f by Steffen Ullrich

### use range of 2 for all RTP/ types, not only for RTP/AVP (i.e. also for RTP/SAVP, RTP/AVPF..)

parent 234767ce
 ... ... @@ -117,7 +117,7 @@ sub new_from_parts { || die "no \$_ in media description"; } \$m_self{range} = delete(\$m{range}) || ( \$m_self{proto} eq 'RTP/AVP' ? 2:1 ); || ( \$m_self{proto} =~m{^RTP/} ? 2:1 ); defined( my \$fmt = \$m_self{fmt} = delete \$m{fmt} ) || die "no fmt in media description"; my \$mline = _join_m( @m_self{qw(media port range proto)},\$fmt ); ... ... @@ -490,14 +490,14 @@ sub _split_m { \$mline =~m{^(\w+)\s+(\d+)(?:/(\d+))?\s+(\S+)((?:\s+\S+)+)} or die "bad [m]edia: '\$mline'"; \$range ||= 1; \$range *=2 if \$proto eq 'RTP/AVP'; # RTP+RTCP \$range *=2 if \$proto =~m{^RTP/}; # RTP+RTCP return (\$media,\$port,\$range,\$proto, [ split( ' ',\$fmt) ]); } sub _join_m { my (\$media,\$port,\$range,\$proto,@fmt) = @_; @fmt = @{\$fmt[0]} if @fmt == 1 && ref(\$fmt[0]); \$range /= 2 if \$proto eq 'RTP/AVP'; \$range /= 2 if \$proto =~m{^RTP/}; \$port .= "/\$range" if \$range>1; return join( ' ',\$media,\$port,\$proto,@fmt ); } ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment