Mpeg: Clarify fallback problems.

Also, modify it in case some packager was patching, so they see this.
This commit is contained in:
Unknown W. Brackets committed 2021-02-18 00:20:27 -08:00
1 parent e5849d109d
commit e3be3d5f7b
1 file changed
+4 -2
+4 -2
View File
@@ -313,8 +313,10 @@ bool MediaEngine::openContext(bool keepReadPos) {
av_dict_free(&open_opt);
if (!SetupStreams()) {
// Fallback to old behavior.
if (avformat_find_stream_info(m_pFormatCtx, NULL) < 0) {
// Fallback to old behavior. Reads too much and corrupts when game doesn't read fast enough.
// SetupStreams should work for newer FFmpeg 3.1+ now.
WARN_LOG_REPORT_ONCE(setupStreams, ME, "Failed to read valid video stream data from header");
if (avformat_find_stream_info(m_pFormatCtx, nullptr) < 0) {
closeContext();
return false;
}