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.
Unified · Split
| @@ -1259,7 +1259,8 @@ start: · 1258 unmodified lines | ||
| 1259 | 1259 | char base64buf[AV_BASE64_SIZE(sizeof(buf))]; |
| 1260 | 1260 | const char* ptr = buf; |
| 1261 | 1261 | |
| 1262 | − if (!strcmp(reply->reason, "OPTIONS")) { | |
| 1262 | + if (!strcmp(reply->reason, "OPTIONS") || | |
| 1263 | + !strcmp(reply->reason, "GET_PARAMETER")) { | |
| 1263 | 1264 | snprintf(buf, sizeof(buf), "RTSP/1.0 200 OK\r\n"); |
| 1264 | 1265 | if (reply->seq) |
| 1265 | 1266 | av_strlcatf(buf, sizeof(buf), "CSeq: %d\r\n", reply->seq); |