mirror of
https://github.com/void-linux/void-packages.git
synced 2025-10-11 21:15:12 +02:00
the discussion about ffmpeg6 can be had once we actually drop ffmpeg4 ffmpeg6 breaks video playback twofold: a) messed up video (can be fixed by using private API to set AVSTREAM_PARSE_FULL) b) ppsspp hangs at the end of a video
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
--- a/Core/HW/MediaEngine.cpp 2024-11-04 17:16:10.000000000 +0100
|
|
+++ - 2024-12-26 20:30:02.355062203 +0100
|
|
@@ -52,6 +52,11 @@
|
|
#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
|
|
|
|
@@ -426,12 +426,17 @@ bool MediaEngine::addVideoStream(int streamNum, int streamId) {
|
|
streamId = PSMF_VIDEO_STREAM_ID | streamNum;
|
|
|
|
stream->id = 0x00000100 | streamId;
|
|
+#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
|
|
+
|
|
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100)
|
|
stream->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
|
|
stream->codecpar->codec_id = AV_CODEC_ID_H264;
|
|
#else
|
|
stream->request_probe = 0;
|
|
- stream->need_parsing = AVSTREAM_PARSE_FULL;
|
|
#endif
|
|
// We could set the width here, but we don't need to.
|
|
if (streamNum >= m_expectedVideoStreams) {
|