From b2df42a97836ed8a97c4479b22e494ae24855b66 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 22:15:23 +0100 Subject: [PATCH] patched to add av_stream_get-first_dts function for chromium [release 5.0-2mamba;Mon Feb 21 2022] --- ...av_stream_get_first_dts-for-chromium.patch | 44 +++++++++++++++++++ ffmpeg.spec | 7 ++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 ffmpeg-5.0-add-av_stream_get_first_dts-for-chromium.patch diff --git a/ffmpeg-5.0-add-av_stream_get_first_dts-for-chromium.patch b/ffmpeg-5.0-add-av_stream_get_first_dts-for-chromium.patch new file mode 100644 index 0000000..fb55898 --- /dev/null +++ b/ffmpeg-5.0-add-av_stream_get_first_dts-for-chromium.patch @@ -0,0 +1,44 @@ +From 95aab0fd83619408995720ce53d7a74790580220 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 + +[foutrelis: adjust for new FFStream struct replacing AVStreamInternal] +--- + libavformat/avformat.h | 4 ++++ + libavformat/utils.c | 7 +++++++ + 2 files changed, 11 insertions(+) + +diff --git a/libavformat/avformat.h b/libavformat/avformat.h +index cd7b0d941c..b4a6dce885 100644 +--- a/libavformat/avformat.h ++++ b/libavformat/avformat.h +@@ -1010,6 +1010,10 @@ struct AVCodecParserContext *av_stream_get_parser(const AVStream *s); + */ + 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 --git a/libavformat/utils.c b/libavformat/utils.c +index de7580c32d..0ef0fe530e 100644 +--- a/libavformat/utils.c ++++ b/libavformat/utils.c +@@ -121,6 +121,13 @@ int64_t av_stream_get_end_pts(const AVStream *st) + return AV_NOPTS_VALUE; + } + ++// 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 st->internal->parser; diff --git a/ffmpeg.spec b/ffmpeg.spec index c8c90fa..f508576 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -5,7 +5,7 @@ Name: ffmpeg Epoch: 1 Version: 5.0 -Release: 1mamba +Release: 2mamba Summary: Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder Group: System/Libraries Vendor: openmamba @@ -17,6 +17,7 @@ Patch1: %{name}-0.4.9-pic.patch Patch2: %{name}-20080820svn-libx264.patch Patch3: %{name}-0.5-x264.patch Patch4: %{name}-0.11-install_url_h.patch +Patch5: ffmpeg-5.0-add-av_stream_get_first_dts-for-chromium.patch License: LGPL, GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -312,6 +313,7 @@ This is a virtual package that contains the dependencies necessary for installin %prep %setup -q -n ffmpeg-%{buildver} %patch4 -p1 +%patch5 -p1 -b .add-av_stream_get_first_dts-for-chromium %build # configure not generated by autoconf @@ -571,6 +573,9 @@ ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a %{_docdir}/ffmpeg/* %changelog +* Mon Feb 21 2022 Silvan Calarco 5.0-2mamba +- patched to add av_stream_get-first_dts function for chromium + * Mon Jan 24 2022 Automatic Build System 5.0-1mamba - automatic version update by autodist