mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-01-21 23:25:09 +00:00
Don't use SdlRenderer with MMAL
This commit is contained in:
parent
97412b3c79
commit
d8acf24af0
1 changed files with 9 additions and 2 deletions
|
@ -709,8 +709,12 @@ bool FFmpegVideoDecoder::tryInitializeRendererForDecoderByName(const char *decod
|
||||||
#ifdef HAVE_MMAL
|
#ifdef HAVE_MMAL
|
||||||
TRY_PREFERRED_PIXEL_FORMAT(MmalRenderer);
|
TRY_PREFERRED_PIXEL_FORMAT(MmalRenderer);
|
||||||
#endif
|
#endif
|
||||||
|
// HACK: Avoid using YUV420P on h264_mmal. It can cause a deadlock inside the MMAL libraries.
|
||||||
|
// Even if it didn't completely deadlock us, the performance would likely be atrocious.
|
||||||
|
if (strcmp(decoderName, "h264_mmal") != 0) {
|
||||||
TRY_PREFERRED_PIXEL_FORMAT(SdlRenderer);
|
TRY_PREFERRED_PIXEL_FORMAT(SdlRenderer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Nothing prefers any of them. Let's see if anyone will tolerate one.
|
// Nothing prefers any of them. Let's see if anyone will tolerate one.
|
||||||
for (int i = 0; decoder->pix_fmts[i] != AV_PIX_FMT_NONE; i++) {
|
for (int i = 0; decoder->pix_fmts[i] != AV_PIX_FMT_NONE; i++) {
|
||||||
|
@ -720,8 +724,11 @@ bool FFmpegVideoDecoder::tryInitializeRendererForDecoderByName(const char *decod
|
||||||
#ifdef HAVE_MMAL
|
#ifdef HAVE_MMAL
|
||||||
TRY_SUPPORTED_PIXEL_FORMAT(MmalRenderer);
|
TRY_SUPPORTED_PIXEL_FORMAT(MmalRenderer);
|
||||||
#endif
|
#endif
|
||||||
|
// HACK: See comment above
|
||||||
|
if (strcmp(decoderName, "h264_mmal") != 0) {
|
||||||
TRY_SUPPORTED_PIXEL_FORMAT(SdlRenderer);
|
TRY_SUPPORTED_PIXEL_FORMAT(SdlRenderer);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// If we made it here, we couldn't find anything
|
// If we made it here, we couldn't find anything
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue