mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-04-18 22:30:01 +00:00
Dynamically allocate the RTSP response buffer
This commit is contained in:
@@ -63,6 +63,14 @@ int extractVersionQuadFromString(const char* string, int* quad) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void* extendBuffer(void* ptr, size_t newSize) {
|
||||
void* newBuf = realloc(ptr, newSize);
|
||||
if (newBuf == NULL && ptr != NULL) {
|
||||
free(ptr);
|
||||
}
|
||||
return newBuf;
|
||||
}
|
||||
|
||||
int isReferenceFrameInvalidationEnabled(void) {
|
||||
LC_ASSERT(NegotiatedVideoFormat != 0);
|
||||
return ((NegotiatedVideoFormat & VIDEO_FORMAT_MASK_H264) && (VideoCallbacks.capabilities & CAPABILITY_REFERENCE_FRAME_INVALIDATION_AVC)) ||
|
||||
|
||||
Reference in New Issue
Block a user