Guard against rtsp response with no content

This commit is contained in:
ns6089
2024-10-15 15:36:32 +03:00
committed by Cameron Gutman
parent 8599b6042a
commit 0fa805d973

View File

@@ -1060,6 +1060,12 @@ int performRtspHandshake(PSERVER_INFORMATION serverInfo) {
goto Exit; goto Exit;
} }
if (!response.payload) {
Limelog("RTSP DESCRIBE no content in response\n");
ret = -1;
goto Exit;
}
if ((StreamConfig.supportedVideoFormats & VIDEO_FORMAT_MASK_AV1) && strstr(response.payload, "AV1/90000")) { if ((StreamConfig.supportedVideoFormats & VIDEO_FORMAT_MASK_AV1) && strstr(response.payload, "AV1/90000")) {
if ((serverInfo->serverCodecModeSupport & SCM_AV1_HIGH10_444) && (StreamConfig.supportedVideoFormats & VIDEO_FORMAT_AV1_HIGH10_444)) { if ((serverInfo->serverCodecModeSupport & SCM_AV1_HIGH10_444) && (StreamConfig.supportedVideoFormats & VIDEO_FORMAT_AV1_HIGH10_444)) {
NegotiatedVideoFormat = VIDEO_FORMAT_AV1_HIGH10_444; NegotiatedVideoFormat = VIDEO_FORMAT_AV1_HIGH10_444;