summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorTreeve Jelbert2022-08-01 14:45:45 +0200
committerTreeve Jelbert2022-08-01 17:14:46 +0200
commitacc606901c2aabc11b5cade48babcb68bb34df21 (patch)
tree5182e20ae2fb61486bc071471814b41acb85b781 /video
parent0d8d5d43ed5d4ca45512a71da87f93cf06e80c35 (diff)
ffmpeg5 - patch for chromium
Diffstat (limited to 'video')
-rwxr-xr-xvideo/ffmpeg5/DETAILS1
-rw-r--r--video/ffmpeg5/HISTORY4
-rwxr-xr-xvideo/ffmpeg5/PRE_BUILD3
-rw-r--r--video/ffmpeg5/patches/ffmpeg-5.1-chromium_method-1.patch42
4 files changed, 50 insertions, 0 deletions
diff --git a/video/ffmpeg5/DETAILS b/video/ffmpeg5/DETAILS
index 10b89443ab..8e876112a0 100755
--- a/video/ffmpeg5/DETAILS
+++ b/video/ffmpeg5/DETAILS
@@ -1,6 +1,7 @@
SPELL=ffmpeg5
SPELLX=ffmpeg
VERSION=5.1
+ PATCHLEVEL=1
SOURCE=$SPELLX-$VERSION.tar.xz
SOURCE2=$SOURCE.asc
SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELLX-$VERSION"
diff --git a/video/ffmpeg5/HISTORY b/video/ffmpeg5/HISTORY
index 8c46da1bf3..c59dcd9bb6 100644
--- a/video/ffmpeg5/HISTORY
+++ b/video/ffmpeg5/HISTORY
@@ -1,3 +1,7 @@
+2022-08-01 Treeve Jelbert <treeve@sourcemage.org>
+ * DETAILS: PATCHLEVEL=1
+ * PRE_BUILD patches/ffmpg: added from BLFS, needed for chromium
+
2022-07-23 Treeve Jelbert <treeve@sourcemage.org>
* DETAILS: version 5.1
diff --git a/video/ffmpeg5/PRE_BUILD b/video/ffmpeg5/PRE_BUILD
new file mode 100755
index 0000000000..4604ffcd89
--- /dev/null
+++ b/video/ffmpeg5/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+apply_patch_dir patches
diff --git a/video/ffmpeg5/patches/ffmpeg-5.1-chromium_method-1.patch b/video/ffmpeg5/patches/ffmpeg-5.1-chromium_method-1.patch
new file mode 100644
index 0000000000..9aee44a5fa
--- /dev/null
+++ b/video/ffmpeg5/patches/ffmpeg-5.1-chromium_method-1.patch
@@ -0,0 +1,42 @@
+Submitted By: Marty Jack (martyj19 at comcast dot net)
+Date: 2022-07-23
+Initial Package Version: 5.1.0
+Origin: Rediffed from ffmpeg-5.0.1-api_addition-1.patch
+Upstream Status: Not accepted
+Description: The ffmpeg upstream is not willing to take this as a
+permanent fix and suggests that Chromium should change to keep the
+information locally to Chromium. Until that happens it appears
+that many distros are carrying this patch as a temporary
+expedient to allow building with system ffmpeg.
+
+diff -Naur ffmpeg-5.1.orig/libavformat/avformat.h ffmpeg-5.1/libavformat/avformat.h
+--- ffmpeg-5.1.orig/libavformat/avformat.h 2022-07-22 13:58:39.000000000 -0400
++++ ffmpeg-5.1/libavformat/avformat.h 2022-07-22 19:34:07.490051886 -0400
+@@ -1128,6 +1128,10 @@
+ */
+ int64_t av_stream_get_end_pts(const AVStream *st);
+
++// 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 -Naur ffmpeg-5.1.orig/libavformat/demux_utils.c ffmpeg-5.1/libavformat/demux_utils.c
+--- ffmpeg-5.1.orig/libavformat/demux_utils.c 2022-07-22 13:58:39.000000000 -0400
++++ ffmpeg-5.1/libavformat/demux_utils.c 2022-07-22 19:36:39.646735587 -0400
+@@ -29,6 +29,13 @@
+ #include "demux.h"
+ #include "internal.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 ^^^
++
+ struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
+ {
+ return cffstream(st)->parser;