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:
parent
682a691173
commit
09c55b0f93
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue