Commit 31180356 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>
parent a065e2d9
...@@ -533,17 +533,14 @@ static void continueAfterOPTIONS( RTSPClient* client, int result_code, ...@@ -533,17 +533,14 @@ static void continueAfterOPTIONS( RTSPClient* client, int result_code,
{ {
RTSPClientVlc *client_vlc = static_cast<RTSPClientVlc *> (client); RTSPClientVlc *client_vlc = static_cast<RTSPClientVlc *> (client);
demux_sys_t *p_sys = client_vlc->p_sys; demux_sys_t *p_sys = client_vlc->p_sys;
p_sys->i_live555_ret = result_code; p_sys->b_get_param =
if ( result_code != 0 ) // If OPTIONS fails, assume GET_PARAMETER is not supported but
{ // still continue on with the stream. Some servers (foscam)
p_sys->b_error = true; // return 501/not implemented for OPTIONS.
p_sys->event_rtsp = 1; result_code != 0
} && result_string != NULL
else && strstr( result_string, "GET_PARAMETER" ) != NULL;
{
p_sys->b_get_param = result_string != NULL && strstr( result_string, "GET_PARAMETER" ) != NULL;
client->sendDescribeCommand( continueAfterDESCRIBE ); client->sendDescribeCommand( continueAfterDESCRIBE );
}
delete[] result_string; 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