Commit f6ead8f7 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

SDP: fix ordering of b= and a=

parent 2c475507
...@@ -792,6 +792,10 @@ static char *SDPGenerate( const sout_stream_t *p_stream, ...@@ -792,6 +792,10 @@ static char *SDPGenerate( const sout_stream_t *p_stream,
sout_stream_id_t *id = p_sys->es[i]; sout_stream_id_t *id = p_sys->es[i];
i_size += strlen( "m=**d*o * RTP/AVP *\r\n" ) + 10 + 10; i_size += strlen( "m=**d*o * RTP/AVP *\r\n" ) + 10 + 10;
if ( id->i_bitrate )
{
i_size += strlen( "b=AS: *\r\n") + 10;
}
if( id->psz_rtpmap ) if( id->psz_rtpmap )
{ {
i_size += strlen( "a=rtpmap:* *\r\n" ) + strlen( id->psz_rtpmap )+10; i_size += strlen( "a=rtpmap:* *\r\n" ) + strlen( id->psz_rtpmap )+10;
...@@ -800,10 +804,6 @@ static char *SDPGenerate( const sout_stream_t *p_stream, ...@@ -800,10 +804,6 @@ static char *SDPGenerate( const sout_stream_t *p_stream,
{ {
i_size += strlen( "a=fmtp:* *\r\n" ) + strlen( id->psz_fmtp ) + 10; i_size += strlen( "a=fmtp:* *\r\n" ) + strlen( id->psz_fmtp ) + 10;
} }
if ( id->i_bitrate)
{
i_size += strlen( "b=AS: *\r\n") + 10;
}
if( b_rtsp ) if( b_rtsp )
{ {
i_size += strlen( "a=control:*/trackID=*\r\n" ) + strlen( p_sys->psz_rtsp_control ) + 10; i_size += strlen( "a=control:*/trackID=*\r\n" ) + strlen( p_sys->psz_rtsp_control ) + 10;
...@@ -861,6 +861,10 @@ static char *SDPGenerate( const sout_stream_t *p_stream, ...@@ -861,6 +861,10 @@ static char *SDPGenerate( const sout_stream_t *p_stream,
{ {
continue; continue;
} }
if ( id->i_bitrate )
{
p += sprintf(p,"b=AS:%d\r\n",id->i_bitrate);
}
if( id->psz_rtpmap ) if( id->psz_rtpmap )
{ {
p += sprintf( p, "a=rtpmap:%d %s\r\n", id->i_payload_type, p += sprintf( p, "a=rtpmap:%d %s\r\n", id->i_payload_type,
...@@ -871,10 +875,6 @@ static char *SDPGenerate( const sout_stream_t *p_stream, ...@@ -871,10 +875,6 @@ static char *SDPGenerate( const sout_stream_t *p_stream,
p += sprintf( p, "a=fmtp:%d %s\r\n", id->i_payload_type, p += sprintf( p, "a=fmtp:%d %s\r\n", id->i_payload_type,
id->psz_fmtp ); id->psz_fmtp );
} }
if ( id->i_bitrate)
{
p += sprintf(p,"b=AS:%d\r\n",id->i_bitrate);
}
if( b_rtsp ) if( b_rtsp )
{ {
p += sprintf( p, "a=control:/trackID=%d\r\n", i ); p += sprintf( p, "a=control:/trackID=%d\r\n", i );
......
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