Commit 42043990 authored by Pierre Ynard's avatar Pierre Ynard Committed by Rémi Denis-Courmont

rtsp: fix RTP-Info header syntax

As per RFC2326, the correct syntax includes a "url=" that is missing
here. Tested (and bug found) with a Real Player client.
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent c9a4092a
...@@ -635,7 +635,7 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id, ...@@ -635,7 +635,7 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
{ {
/* FIXME: we really need to limit the number of tracks... */ /* FIXME: we really need to limit the number of tracks... */
char info[ses->trackc * ( strlen( control ) char info[ses->trackc * ( strlen( control )
+ sizeof("/trackID=123;seq=65535, ") ) + 1]; + sizeof("url=/trackID=123;seq=65535, ") ) + 1];
size_t infolen = 0; size_t infolen = 0;
for( int i = 0; i < ses->trackc; i++ ) for( int i = 0; i < ses->trackc; i++ )
...@@ -649,7 +649,8 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id, ...@@ -649,7 +649,8 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
rtp_add_sink( tr->id, tr->fd, false ); rtp_add_sink( tr->id, tr->fd, false );
} }
infolen += sprintf( info + infolen, infolen += sprintf( info + infolen,
"%s/trackID=%u;seq=%u, ", control, "url=%s/trackID=%u;seq=%u, ",
control,
rtp_get_num( tr->id ), rtp_get_num( tr->id ),
rtp_get_seq( tr->id ) ); rtp_get_seq( tr->id ) );
} }
......
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