[FFmpeg] chromium patch (#38683)

Required to build qtwebengine and probably chromium itself with ffmpeg
on linux-dynamic
This commit is contained in:
Alexander Neumann 2024-05-28 08:10:28 +02:00 committed by GitHub
parent 007aaced1a
commit 9828b5b935
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 43 additions and 2 deletions

View File

@ -0,0 +1,35 @@
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index cd7b0d941c..b4a6dce885 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1010,7 +1010,11 @@ struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
attribute_deprecated
int64_t av_stream_get_end_pts(const AVStream *st);
#endif
+// Chromium: We use the internal field first_dts vvv
+int64_t av_stream_get_first_dts(const AVStream *st);
+// Chromium: We use the internal field first_dts ^^^
+
#define AV_PROGRAM_RUNNING 1
/**
diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c
index de7580c32d..0ef0fe530e 100644
--- a/libavformat/mux_utils.c
+++ b/libavformat/mux_utils.c
@@ -33,7 +33,14 @@ int64_t av_stream_get_end_pts(const AVStream *st)
return AV_NOPTS_VALUE;
}
#endif
+// Chromium: We use the internal field first_dts vvv
+int64_t av_stream_get_first_dts(const AVStream *st)
+{
+ return cffstream(st)->first_dts;
+}
+// Chromium: We use the internal field first_dts ^^^
+
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
int std_compliance)
{

View File

@ -19,6 +19,7 @@ vcpkg_from_github(
0015-Fix-xml2-detection.patch
0020-fix-aarch64-libswscale.patch
0022-fix-iconv.patch
0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch # Do not remove this patch. It is required by chromium
)
if(SOURCE_PATH MATCHES " ")

View File

@ -1,7 +1,7 @@
{
"name": "ffmpeg",
"version": "6.1.1",
"port-version": 4,
"port-version": 5,
"description": [
"a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.",
"FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations."

View File

@ -2682,7 +2682,7 @@
},
"ffmpeg": {
"baseline": "6.1.1",
"port-version": 4
"port-version": 5
},
"ffnvcodec": {
"baseline": "12.1.14.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "85d4d87ea35d942b4f5ed800f6c6c7c0a00c3e5d",
"version": "6.1.1",
"port-version": 5
},
{
"git-tree": "f5dac82c697daa8b59321a7e13596325efb8b278",
"version": "6.1.1",