From 66304703e11367f622eba8d41af9a677a07411fe Mon Sep 17 00:00:00 2001 From: EnumDev Date: Thu, 8 Jan 2026 17:05:58 +0200 Subject: [PATCH] Rebuild with chromium patch --- pkg.info | 2 +- source-files/chromium-fixes.patch | 43 +++++++++++++++++++++++++++++++ source.sh | 7 +++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 source-files/chromium-fixes.patch diff --git a/pkg.info b/pkg.info index 60a64fb..72f6d11 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,7 @@ name: ffmpeg description: A complete, cross-platform solution to record, convert and stream audio and video version: 8.0.1 -revision: 1 +revision: 2 url: https://ffmpeg.org/ license: GPL3-only architecture: any diff --git a/source-files/chromium-fixes.patch b/source-files/chromium-fixes.patch new file mode 100644 index 0000000..4bb02e4 --- /dev/null +++ b/source-files/chromium-fixes.patch @@ -0,0 +1,43 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "liberato@chromium.org" +Date: Wed, 7 Jul 2021 19:01:22 -0700 +Subject: [PATCH] Add av_stream_get_first_dts for Chromium + +--- + libavformat/avformat.h | 4 ++++ + libavformat/mux_utils.c | 7 +++++++ + 2 files changed, 11 insertions(+) + +diff --git a/libavformat/avformat.h b/libavformat/avformat.h +index 56c1c8028996..75221d9d1a1e 100644 +--- a/libavformat/avformat.h ++++ b/libavformat/avformat.h +@@ -1202,6 +1202,10 @@ typedef struct AVStreamGroup { + + struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); + ++// 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 ed1242a6a28f..7c04d4b9f269 100644 +--- a/libavformat/mux_utils.c ++++ b/libavformat/mux_utils.c +@@ -30,6 +30,13 @@ + #include "internal.h" + #include "mux.h" + ++// 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) + { diff --git a/source.sh b/source.sh index bec3858..1624aed 100644 --- a/source.sh +++ b/source.sh @@ -2,6 +2,13 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT +# The prepare function is executed in the root of the temp directory +# This function is used for putting downloaded files to the correct location or applying patches +prepare() { + cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/chromium-fixes.patch +} + # The build function is executed in the source directory # This function is used to compile the source code build() {