From 3b6ee9d916b0b1a7071fb9233e46089a59585bc7 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 10 Nov 2026 21:25:16 -0600 Subject: [PATCH] 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. --- src/Limelight.h | 1 - src/VideoDepacketizer.c | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/src/Limelight.h b/src/Limelight.h index 22bee46..f0593c1 100644 --- a/src/Limelight.h +++ b/src/Limelight.h @@ -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); diff --git a/src/VideoDepacketizer.c b/src/VideoDepacketizer.c index 9732ee4..866a96e 100644 --- a/src/VideoDepacketizer.c +++ b/src/VideoDepacketizer.c @@ -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); }