Skip to content

Commit

Permalink
Mpeg: Set low latency flag for video decode.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Feb 21, 2021
1 parent 9d031ca commit d6dc6e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Core/HLE/sceMpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions Core/HW/MediaEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d6dc6e9

Please sign in to comment.