Commit 7f12d460 authored by Daniel Peng's avatar Daniel Peng Committed by Jean-Baptiste Kempf

Some RTSP implementations (Foscam H.264 IP cameras) return HTTP/1.1 501...

Some RTSP implementations (Foscam H.264 IP cameras) return HTTP/1.1 501 Unimplemented on OPTIONS requests. Don't fail out in this case; just continue and assume GET_PARAMETERS is unsupported.

I have a Foscam h.264 IP camera with a very strange RTSP-over-HTTP
server, and I wanted to get VLC to play it back.  Here's the patch
to VLC; I also had a patch committed to live555 to resolve a few
other issues, and that's available in live.2012.09.13.tar.gz.  Do I
need to submit a patch to contrib/src/live555/rules.mak to pick that
new version up?  Or is there a special process for that?  Or should
I just wait a little bit?  :)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit 31180356048402d449f4ee765da20e67ff7e8005)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 1a634ca6
......@@ -532,17 +532,14 @@ static void continueAfterOPTIONS( RTSPClient* client, int result_code,
{
RTSPClientVlc *client_vlc = static_cast<RTSPClientVlc *> (client);
demux_sys_t *p_sys = client_vlc->p_sys;
p_sys->i_live555_ret = result_code;
if ( result_code != 0 )
{
p_sys->b_error = true;
p_sys->event_rtsp = 1;
}
else
{
p_sys->b_get_param = result_string != NULL && strstr( result_string, "GET_PARAMETER" ) != NULL;
client->sendDescribeCommand( continueAfterDESCRIBE );
}
p_sys->b_get_param =
// If OPTIONS fails, assume GET_PARAMETER is not supported but
// still continue on with the stream. Some servers (foscam)
// return 501/not implemented for OPTIONS.
result_code != 0
&& result_string != NULL
&& strstr( result_string, "GET_PARAMETER" ) != NULL;
client->sendDescribeCommand( continueAfterDESCRIBE );
delete[] result_string;
}
......
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