mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Revert "ffmpeg: Don't ask for multi-threaded decoding"
This reverts commit b173e0f4a4
.
Turns out it's not actually known to fix anything, should have closed
that old PR.
This commit is contained in:
parent
ca3303d507
commit
0a13c78788
3 changed files with 8 additions and 3 deletions
|
@ -521,7 +521,11 @@ bool MediaEngine::setVideoStream(int streamNum, bool force) {
|
|||
|
||||
m_pCodecCtx->flags |= AV_CODEC_FLAG_OUTPUT_CORRUPT | AV_CODEC_FLAG_LOW_DELAY;
|
||||
|
||||
int openResult = avcodec_open2(m_pCodecCtx, pCodec, nullptr);
|
||||
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);
|
||||
int openResult = avcodec_open2(m_pCodecCtx, pCodec, &opt);
|
||||
av_dict_free(&opt);
|
||||
if (openResult < 0) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -107,10 +107,12 @@ bool SimpleAudio::OpenCodec(int block_align) {
|
|||
codecCtx_->block_align = block_align;
|
||||
}
|
||||
|
||||
int retval = avcodec_open2(codecCtx_, codec_, nullptr);
|
||||
AVDictionary *opts = 0;
|
||||
int retval = avcodec_open2(codecCtx_, codec_, &opts);
|
||||
if (retval < 0) {
|
||||
ERROR_LOG(ME, "Failed to open codec: retval = %i", retval);
|
||||
}
|
||||
av_dict_free(&opts);
|
||||
codecOpen_ = true;
|
||||
return retval >= 0;
|
||||
#else
|
||||
|
|
|
@ -268,7 +268,6 @@ bool HandleFault(uintptr_t hostAddress, void *ctx) {
|
|||
}
|
||||
} else {
|
||||
type = MemoryExceptionType::UNKNOWN;
|
||||
|
||||
}
|
||||
|
||||
g_lastMemoryExceptionType = type;
|
||||
|
|
Loading…
Add table
Reference in a new issue