Deal with newer FFmpeg API.

Index: Core/HW/MediaEngine.cpp
--- Core/HW/MediaEngine.cpp.orig
+++ Core/HW/MediaEngine.cpp
@@ -38,6 +38,11 @@ extern "C" {
 #include "libavutil/imgutils.h"
 #include "libswscale/swscale.h"
 
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 23, 100)
+	// private libavformat api (see demux.h in ffmpeg src tree)
+	void avpriv_stream_set_need_parsing(AVStream *st, enum AVStreamParseType type);
+#endif
+
 }
 #endif // USE_FFMPEG
 
@@ -410,13 +415,19 @@ bool MediaEngine::addVideoStream(int streamNum, int st
 #else
 			stream->request_probe = 0;
 #endif
+#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(59, 23, 100)
+			avpriv_stream_set_need_parsing(stream, AVSTREAM_PARSE_FULL);
+#else
 			stream->need_parsing = AVSTREAM_PARSE_FULL;
+#endif
 			// We could set the width here, but we don't need to.
 			if (streamNum >= m_expectedVideoStreams) {
 				++m_expectedVideoStreams;
 			}
 
+#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 33, 100)
 			m_codecsToClose.push_back(stream->codec);
+#endif
 			return true;
 		}
 	}
@@ -499,7 +510,7 @@ bool MediaEngine::setVideoStream(int streamNum, bool f
 
 		AVStream *stream = m_pFormatCtx->streams[streamNum];
 #if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100)
-		AVCodec *pCodec = avcodec_find_decoder(stream->codecpar->codec_id);
+		const AVCodec *pCodec = avcodec_find_decoder(stream->codecpar->codec_id);
 		if (!pCodec) {
 			WARN_LOG_REPORT(ME, "Could not find decoder for %d", (int)stream->codecpar->codec_id);
 			return false;
