mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-11-28 16:54:32 +00:00
Remove LiPeekNextVideoFrame API
Due to internal queue flushes outside of the app's control, this API has fundamental UAF issues and is not possible to use safely.
This commit is contained in:
1 parent
4aa7ea4e84
commit
3b6ee9d916
2 files changed
-15
No files matched your search
@@ -970,7 +970,6 @@ unsigned int LiTestClientConnectivity(const char* testServer, unsigned short ref
|
||||
typedef void* VIDEO_FRAME_HANDLE;
|
||||
bool LiWaitForNextVideoFrame(VIDEO_FRAME_HANDLE* frameHandle, PDECODE_UNIT* decodeUnit);
|
||||
bool LiPollNextVideoFrame(VIDEO_FRAME_HANDLE* frameHandle, PDECODE_UNIT* decodeUnit);
|
||||
bool LiPeekNextVideoFrame(PDECODE_UNIT* decodeUnit);
|
||||
void LiWakeWaitForVideoFrame(void);
|
||||
void LiCompleteVideoFrame(VIDEO_FRAME_HANDLE handle, int drStatus);
|
||||
|
||||
|
||||
@@ -290,20 +290,6 @@ bool LiPollNextVideoFrame(VIDEO_FRAME_HANDLE* frameHandle, PDECODE_UNIT* decodeU
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LiPeekNextVideoFrame(PDECODE_UNIT* decodeUnit) {
|
||||
PQUEUED_DECODE_UNIT qdu;
|
||||
|
||||
int err = LbqPeekQueueElement(&decodeUnitQueue, (void**)&qdu);
|
||||
if (err != LBQ_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
validateDecodeUnitForPlayback(&qdu->decodeUnit);
|
||||
|
||||
*decodeUnit = &qdu->decodeUnit;
|
||||
return true;
|
||||
}
|
||||
|
||||
void LiWakeWaitForVideoFrame(void) {
|
||||
LbqSignalQueueUserWake(&decodeUnitQueue);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user