2
0
mirror of https://github.com/Genymobile/scrcpy synced 2025-08-30 13:58:08 +00:00

Set "low delay" decoder flag

I don't really know the concrete benefits, but scrcpy definitely wants
low delay decoding.

Suggested-by: François Cartegnie <fcvlcdev@free.fr>
This commit is contained in:
Romain Vimont
2021-12-07 13:59:20 +01:00
parent 682a691173
commit 09c55b0f93

View File

@@ -46,6 +46,8 @@ decoder_open(struct decoder *decoder, const AVCodec *codec) {
return false; return false;
} }
decoder->codec_ctx->flags |= AV_CODEC_FLAG_LOW_DELAY;
if (avcodec_open2(decoder->codec_ctx, codec, NULL) < 0) { if (avcodec_open2(decoder->codec_ctx, codec, NULL) < 0) {
LOGE("Could not open codec"); LOGE("Could not open codec");
avcodec_free_context(&decoder->codec_ctx); avcodec_free_context(&decoder->codec_ctx);