Commit 30dd905e authored by Julian Scheel's avatar Julian Scheel Committed by Jean-Baptiste Kempf

live555: Use OPTIONS as keep-alive fallback

So far no keep-alive messages are sent when GET_PARAMETERS is not supported by
the server. Change this to fall back to sending OPTIONS as keep-alive message,
which is the default keep-alive message in the SAT>IP specification. As
RFC2326 does not enforce a specific command as keep-alive message this shall
be valid for any compliant RTSP server.
Signed-off-by: Julian Scheel's avatarJulian Scheel <julian@jusst.de>
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 8d0b0e89
...@@ -1228,9 +1228,9 @@ static int Play( demux_t *p_demux ) ...@@ -1228,9 +1228,9 @@ static int Play( demux_t *p_demux )
if( p_sys->i_timeout <= 0 ) if( p_sys->i_timeout <= 0 )
p_sys->i_timeout = 60; /* default value from RFC2326 */ p_sys->i_timeout = 60; /* default value from RFC2326 */
/* start timeout-thread only if GET_PARAMETER is supported by the server */ /* start timeout-thread. GET_PARAMETER will be used if supported by
/* or start it if wmserver dialect, since they don't report that GET_PARAMETER is supported correctly */ * the server. OPTIONS will be used as a fallback */
if( !p_sys->p_timeout && ( p_sys->b_get_param || var_InheritBool( p_demux, "rtsp-wmserver" ) ) ) if( !p_sys->p_timeout )
{ {
msg_Dbg( p_demux, "We have a timeout of %d seconds", p_sys->i_timeout ); msg_Dbg( p_demux, "We have a timeout of %d seconds", p_sys->i_timeout );
p_sys->p_timeout = (timeout_thread_t *)malloc( sizeof(timeout_thread_t) ); p_sys->p_timeout = (timeout_thread_t *)malloc( sizeof(timeout_thread_t) );
...@@ -1279,7 +1279,13 @@ static int Demux( demux_t *p_demux ) ...@@ -1279,7 +1279,13 @@ static int Demux( demux_t *p_demux )
if( p_sys->b_timeout_call && p_sys->rtsp && p_sys->ms ) if( p_sys->b_timeout_call && p_sys->rtsp && p_sys->ms )
{ {
char *psz_bye = NULL; char *psz_bye = NULL;
p_sys->rtsp->sendGetParameterCommand( *p_sys->ms, NULL, psz_bye ); /* Use GET_PARAMETERS if supported. wmserver dialect supports
* it, but does not report this properly. */
if( p_sys->b_get_param || var_GetBool( p_demux, "rtsp-wmserver" ) )
p_sys->rtsp->sendGetParameterCommand( *p_sys->ms, NULL, psz_bye );
else
p_sys->rtsp->sendOptionsCommand(NULL, NULL);
p_sys->b_timeout_call = false; p_sys->b_timeout_call = false;
} }
......
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