mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-06-17 14:21:30 +00:00
Remove unnecessary field in QDU struct
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
typedef struct _QUEUED_DECODE_UNIT {
|
typedef struct _QUEUED_DECODE_UNIT {
|
||||||
DECODE_UNIT decodeUnit;
|
DECODE_UNIT decodeUnit;
|
||||||
LINKED_BLOCKING_QUEUE_ENTRY entry;
|
LINKED_BLOCKING_QUEUE_ENTRY entry;
|
||||||
int onStack;
|
|
||||||
} QUEUED_DECODE_UNIT, *PQUEUED_DECODE_UNIT;
|
} QUEUED_DECODE_UNIT, *PQUEUED_DECODE_UNIT;
|
||||||
|
|
||||||
void completeQueuedDecodeUnit(PQUEUED_DECODE_UNIT qdu, int drStatus);
|
void completeQueuedDecodeUnit(PQUEUED_DECODE_UNIT qdu, int drStatus);
|
||||||
|
|||||||
@@ -179,7 +179,6 @@ static int getSpecialSeq(PBUFFER_DESC current, PBUFFER_DESC candidate) {
|
|||||||
int getNextQueuedDecodeUnit(PQUEUED_DECODE_UNIT* qdu) {
|
int getNextQueuedDecodeUnit(PQUEUED_DECODE_UNIT* qdu) {
|
||||||
int err = LbqWaitForQueueElement(&decodeUnitQueue, (void**)qdu);
|
int err = LbqWaitForQueueElement(&decodeUnitQueue, (void**)qdu);
|
||||||
if (err == LBQ_SUCCESS) {
|
if (err == LBQ_SUCCESS) {
|
||||||
LC_ASSERT(!(*qdu)->onStack);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -207,7 +206,8 @@ void completeQueuedDecodeUnit(PQUEUED_DECODE_UNIT qdu, int drStatus) {
|
|||||||
free(lastEntry->allocPtr);
|
free(lastEntry->allocPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!qdu->onStack) {
|
// We will have stack-allocated entries iff we have a direct-submit decoder
|
||||||
|
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
||||||
free(qdu);
|
free(qdu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -274,9 +274,6 @@ static void reassembleFrame(int frameNumber) {
|
|||||||
nalChainDataLength = 0;
|
nalChainDataLength = 0;
|
||||||
|
|
||||||
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
if ((VideoCallbacks.capabilities & CAPABILITY_DIRECT_SUBMIT) == 0) {
|
||||||
// Dynamically allocated
|
|
||||||
qdu->onStack = 0;
|
|
||||||
|
|
||||||
if (LbqOfferQueueItem(&decodeUnitQueue, qdu, &qdu->entry) == LBQ_BOUND_EXCEEDED) {
|
if (LbqOfferQueueItem(&decodeUnitQueue, qdu, &qdu->entry) == LBQ_BOUND_EXCEEDED) {
|
||||||
Limelog("Video decode unit queue overflow\n");
|
Limelog("Video decode unit queue overflow\n");
|
||||||
|
|
||||||
@@ -297,9 +294,6 @@ static void reassembleFrame(int frameNumber) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Allocated on stack
|
|
||||||
qdu->onStack = 1;
|
|
||||||
|
|
||||||
int ret = VideoCallbacks.submitDecodeUnit(&qdu->decodeUnit);
|
int ret = VideoCallbacks.submitDecodeUnit(&qdu->decodeUnit);
|
||||||
|
|
||||||
completeQueuedDecodeUnit(qdu, ret);
|
completeQueuedDecodeUnit(qdu, ret);
|
||||||
|
|||||||
Reference in New Issue
Block a user