mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-08-27 04:37:41 +00:00
Use requested color range as a fallback in isFrameFullRange()
This commit is contained in:
@@ -247,10 +247,16 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual bool isFrameFullRange(const AVFrame* frame) {
|
virtual bool isFrameFullRange(const AVFrame* frame) {
|
||||||
// This handles the case where the color range is unknown,
|
switch (frame->color_range) {
|
||||||
// so that we use Limited color range which is the default
|
case AVCOL_RANGE_JPEG:
|
||||||
// behavior for Moonlight.
|
return true;
|
||||||
return frame->color_range == AVCOL_RANGE_JPEG;
|
case AVCOL_RANGE_MPEG:
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
// If the color range is not populated, assume the encoder
|
||||||
|
// is sending the color range that we requested.
|
||||||
|
return getDecoderColorRange() == COLOR_RANGE_FULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool isRenderThreadSupported() {
|
virtual bool isRenderThreadSupported() {
|
||||||
|
|||||||
Reference in New Issue
Block a user