Merge pull request #14199 from unknownbrackets/ffmpeg-update

Mpeg: Set low latency flag for video decode
This commit is contained in:
Henrik Rydgård 2021-02-21 18:42:33 +01:00 committed by GitHub
commit 7cefafeb31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -805,6 +805,8 @@ static bool InitPmp(MpegContext * ctx){
return false;
}
pmp_CodecCtx->flags |= AV_CODEC_FLAG_OUTPUT_CORRUPT | AV_CODEC_FLAG_LOW_DELAY;
// each pmp video context is corresponding to one pmp video codec
mediaengine->m_pCodecCtxs[0] = pmp_CodecCtx;

View File

@ -542,6 +542,8 @@ bool MediaEngine::setVideoStream(int streamNum, bool force) {
}
#endif
m_pCodecCtx->flags |= AV_CODEC_FLAG_OUTPUT_CORRUPT | AV_CODEC_FLAG_LOW_DELAY;
AVDictionary *opt = nullptr;
// Allow ffmpeg to use any number of threads it wants. Without this, it doesn't use threads.
av_dict_set(&opt, "threads", "0", 0);