History

libavformat/rtsp.c: Reply to GET_PARAMETER requests

Some encoders send GET_PARAMETER requests as a keep-alive mechanism. If the client doesn't reply with an OK message, the encoder will close the session. This was encountered with the impath i5110 encoder, when the RTSP Keep-Alive checkbox is enabled under streaming settings. Alternatively one may set the X-No-Keepalive: 1 header, but this is more of a workaround. It's better practice to respond to an encoder's keep-alive request, than disable the mechanism which may be manufacturer specific.

Hayden Myers committed 5 years ago

Commit 9b4b0df1 parent a948e471 file · +2 −1Browse files

Unified · Split

libavformat/rtsp.c+2−1
@@ -1259,7 +1259,8 @@ start: · 1258 unmodified lines
12591259 char base64buf[AV_BASE64_SIZE(sizeof(buf))];
12601260 const char* ptr = buf;
12611261
1262− if (!strcmp(reply->reason, "OPTIONS")) {
1262+ if (!strcmp(reply->reason, "OPTIONS") ||
1263+ !strcmp(reply->reason, "GET_PARAMETER")) {
12631264 snprintf(buf, sizeof(buf), "RTSP/1.0 200 OK\r\n");
12641265 if (reply->seq)
12651266 av_strlcatf(buf, sizeof(buf), "CSeq: %d\r\n", reply->seq);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t