1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

avcodec/mfenc: add AVLowLatencyMode support

Set CODECAPI_AVLowLatencyMode when AV_CODEC_FLAG_LOW_DELAY is enabled on
the AVCodecContext. AVLowLatencyMode can acheive lower latency encoding
that may not be accessible using eAVScenarioInfo options alone.

Signed-off-by: Cameron Gutman <aicommander@gmail.com>
This commit is contained in:
Cameron Gutman
2025-08-31 16:05:15 -05:00
committed by James Almer
parent f2414fb1aa
commit 126671e730

View File

@@ -876,6 +876,9 @@ static int mf_encv_output_adjust(AVCodecContext *avctx, IMFMediaType *type)
if (c->opt_enc_scenario >= 0) if (c->opt_enc_scenario >= 0)
ICodecAPI_SetValue(c->codec_api, &ff_CODECAPI_AVScenarioInfo, FF_VAL_VT_UI4(c->opt_enc_scenario)); ICodecAPI_SetValue(c->codec_api, &ff_CODECAPI_AVScenarioInfo, FF_VAL_VT_UI4(c->opt_enc_scenario));
if (avctx->flags & AV_CODEC_FLAG_LOW_DELAY)
ICodecAPI_SetValue(c->codec_api, &ff_CODECAPI_AVLowLatencyMode, FF_VAL_VT_UI4(1));
} }
return 0; return 0;