mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 01:15:46 +00:00
Improve decoder compatibility by using num_ref_frames=1 when RFI is disabled. Fixes decoder hangs on Amlogic SoCs.
This commit is contained in:
parent
deb0e69d64
commit
f6ae7fc2b4
@ -324,6 +324,18 @@ static PSDP_OPTION getAttributesList(char*urlSafeAddr) {
|
||||
err |= addAttributeString(&optionHead, "x-nv-video[0].videoEncoderSlicesPerFrame", payloadStr);
|
||||
}
|
||||
|
||||
if (AppVersionQuad[0] >= 7) {
|
||||
if (isReferenceFrameInvalidationEnabled()) {
|
||||
err |= addAttributeString(&optionHead, "x-nv-video[0].maxNumReferenceFrames", "0");
|
||||
}
|
||||
else {
|
||||
// Restrict the video stream to 1 reference frame if we're not using
|
||||
// reference frame invalidation. This helps to improve compatibility with
|
||||
// some decoders that don't like the default of having 16 reference frames.
|
||||
err |= addAttributeString(&optionHead, "x-nv-video[0].maxNumReferenceFrames", "1");
|
||||
}
|
||||
}
|
||||
|
||||
if (StreamConfig.audioConfiguration == AUDIO_CONFIGURATION_51_SURROUND) {
|
||||
audioChannelCount = CHANNEL_COUNT_51_SURROUND;
|
||||
audioChannelMask = CHANNEL_MASK_51_SURROUND;
|
||||
|
Loading…
x
Reference in New Issue
Block a user