- add Requires/Conflicts for ABI break in fmpeg-free 6.0.1

- drop first_dts patch, reintroduce first_dts patch in ffmpeg-free-6.0.1
- fixed python3 syntaxWarning: invalid escape sequenc
- skip clang's patches for epel8 that now gets clang-16 update
i9ce
Than Ngo 10 months ago
parent 7fc989cee8
commit b4425ac642

@ -1,94 +0,0 @@
diff -up chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.cc.first_dts chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.cc
--- chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.cc.first_dts 2023-11-01 19:10:31.000000000 +0100
+++ chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.cc 2023-11-06 13:05:09.819011697 +0100
@@ -101,7 +101,7 @@ static base::TimeDelta FramesToTimeDelta
sample_rate);
}
-static base::TimeDelta ExtractStartTime(AVStream* stream) {
+static base::TimeDelta ExtractStartTime(AVStream* stream, int64_t first_dts) {
// The default start time is zero.
base::TimeDelta start_time;
@@ -111,12 +111,12 @@ static base::TimeDelta ExtractStartTime(
// Next try to use the first DTS value, for codecs where we know PTS == DTS
// (excludes all H26x codecs). The start time must be returned in PTS.
- if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
+ if (first_dts != AV_NOPTS_VALUE &&
stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
const base::TimeDelta first_pts =
- ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
+ ConvertFromTimeBase(stream->time_base, first_dts);
if (first_pts < start_time)
start_time = first_pts;
}
@@ -274,6 +274,7 @@ FFmpegDemuxerStream::FFmpegDemuxerStream
fixup_negative_timestamps_(false),
fixup_chained_ogg_(false),
num_discarded_packet_warnings_(0),
+ first_dts_(AV_NOPTS_VALUE),
last_packet_pos_(AV_NOPTS_VALUE),
last_packet_dts_(AV_NOPTS_VALUE) {
DCHECK(demuxer_);
@@ -336,6 +337,10 @@ void FFmpegDemuxerStream::EnqueuePacket(
int64_t packet_dts =
packet->dts == AV_NOPTS_VALUE ? packet->pts : packet->dts;
+ if (first_dts_ == AV_NOPTS_VALUE) {
+ first_dts_ = packet_dts;
+ }
+
// Chained ogg files have non-monotonically increasing position and time stamp
// values, which prevents us from using them to determine if a packet should
// be dropped. Since chained ogg is only allowed on single track audio only
@@ -1442,7 +1447,8 @@ void FFmpegDemuxer::OnFindStreamInfoDone
max_duration = std::max(max_duration, streams_[i]->duration());
- base::TimeDelta start_time = ExtractStartTime(stream);
+ base::TimeDelta start_time =
+ ExtractStartTime(stream, streams_[i]->first_dts());
// Note: This value is used for seeking, so we must take the true value and
// not the one possibly clamped to zero below.
@@ -1604,7 +1610,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::Find
for (const auto& stream : streams_) {
if (!stream || stream->IsEnabled() != enabled)
continue;
- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
+ if (stream->first_dts() == AV_NOPTS_VALUE)
continue;
if (!lowest_start_time_stream ||
stream->start_time() < lowest_start_time_stream->start_time()) {
@@ -1625,7 +1631,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::Find
if (stream->type() != DemuxerStream::VIDEO)
continue;
- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
+ if (stream->first_dts() == AV_NOPTS_VALUE)
continue;
if (!stream->IsEnabled())
diff -up chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.h.first_dts chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.h
--- chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.h.first_dts 2023-11-01 19:10:31.000000000 +0100
+++ chromium-119.0.6045.105/media/filters/ffmpeg_demuxer.h 2023-11-06 13:08:43.425784988 +0100
@@ -142,6 +142,8 @@ class MEDIA_EXPORT FFmpegDemuxerStream :
base::TimeDelta start_time() const { return start_time_; }
void set_start_time(base::TimeDelta time) { start_time_ = time; }
+ int64_t first_dts() const { return first_dts_; }
+
private:
friend class FFmpegDemuxerTest;
@@ -198,6 +200,7 @@ class MEDIA_EXPORT FFmpegDemuxerStream :
bool fixup_chained_ogg_;
int num_discarded_packet_warnings_;
+ int64_t first_dts_;
int64_t last_packet_pos_;
int64_t last_packet_dts_;
// Requested buffer count. The actual returned buffer count could be less

@ -266,8 +266,8 @@
%endif %endif
Name: chromium%{chromium_channel} Name: chromium%{chromium_channel}
Version: 119.0.6045.123 Version: 119.0.6045.159
Release: 2%{?dist} Release: 1%{?dist}
Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use
Url: http://www.chromium.org/Home Url: http://www.chromium.org/Home
License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only) License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only)
@ -365,8 +365,6 @@ Patch112: chromium-117-el7-default_constructor.patch
Patch114: chromium-107-ffmpeg-5.x-duration.patch Patch114: chromium-107-ffmpeg-5.x-duration.patch
# disable the check # disable the check
Patch115: chromium-107-proprietary-codecs.patch Patch115: chromium-107-proprietary-codecs.patch
# drop av_stream_get_first_dts from internal ffmpeg
Patch116: chromium-119-ffmpeg-first_dts.patch
# fix tab crash with SIGTRAP error when using system ffmpeg # fix tab crash with SIGTRAP error when using system ffmpeg
Patch117: chromium-118-sigtrap_system_ffmpeg.patch Patch117: chromium-118-sigtrap_system_ffmpeg.patch
@ -376,7 +374,7 @@ Patch130: chromium-119-revert-av1enc-el9.patch
# file conflict with old kernel on el8/el9 # file conflict with old kernel on el8/el9
Patch140: chromium-118-dma_buf_export_sync_file-conflict.patch Patch140: chromium-118-dma_buf_export_sync_file-conflict.patch
# fixes for old clang version in fedora < 38 end epel < 9 (old clang <= 15) # fixes for old clang version in fedora < 38 end epel < 8 (old clang <= 15)
# compiler build errors, no matching constructor for initialization # compiler build errors, no matching constructor for initialization
Patch300: chromium-119-no_matching_constructor.patch Patch300: chromium-119-no_matching_constructor.patch
Patch301: chromium-115-compiler-SkColor4f.patch Patch301: chromium-115-compiler-SkColor4f.patch
@ -495,6 +493,10 @@ BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavfilter) BuildRequires: pkgconfig(libavfilter)
BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil) BuildRequires: pkgconfig(libavutil)
# chromium fail to start for rpmfusion users due to ABI break in ffmpeg-free-6.0.1
# bethween fedora and rpmfussion.
Conflicts: ffmpeg-libs%{_isa}
Requires: libavformat-free%{_isa} >= 6.0.1
%endif %endif
# build with system libaom # build with system libaom
@ -958,7 +960,6 @@ udev.
%if ! %{bundleffmpegfree} %if ! %{bundleffmpegfree}
%if 0%{?rhel} == 9 || 0%{?fedora} == 37 %if 0%{?rhel} == 9 || 0%{?fedora} == 37
%patch -P114 -p1 -b .ffmpeg-5.x-duration %patch -P114 -p1 -b .ffmpeg-5.x-duration
%patch -P116 -p1 -b .first_dts
%endif %endif
%patch -P115 -p1 -b .prop-codecs %patch -P115 -p1 -b .prop-codecs
%patch -P117 -p1 -b .sigtrap_system_ffmpeg %patch -P117 -p1 -b .sigtrap_system_ffmpeg
@ -989,7 +990,7 @@ udev.
%endif %endif
%if %{clang} %if %{clang}
%if 0%{?rhel} < 9 || 0%{?fedora} < 38 %if 0%{?rhel} < 8 || 0%{?fedora} < 38
%patch -P300 -p1 -b .no_matching_constructor %patch -P300 -p1 -b .no_matching_constructor
%patch -P301 -p1 -b .workaround_clang-SkColor4f %patch -P301 -p1 -b .workaround_clang-SkColor4f
%patch -P302 -p1 -b .workaround_clang_bug-structured_binding %patch -P302 -p1 -b .workaround_clang_bug-structured_binding
@ -1706,6 +1707,12 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%{chromium_path}/chromedriver %{chromium_path}/chromedriver
%changelog %changelog
* Wed Nov 15 2023 Than Ngo <than@redhat.com> - 119.0.6045.159-1
- add Requires/Conflicts for ABI break in fmpeg-free 6.0.1
- drop first_dts patch, reintroduce first_dts patch in ffmpeg-free-6.0.1
- fixed python3 syntaxWarning: invalid escape sequenc
- skip clang's patches for epel8 that now gets clang-16 update
* Mon Nov 13 2023 Than Ngo <than@redhat.com> - 119.0.6045.123-2 * Mon Nov 13 2023 Than Ngo <than@redhat.com> - 119.0.6045.123-2
- fixed bz#2240127, Some h.264 mp4s do not play - fixed bz#2240127, Some h.264 mp4s do not play

Loading…
Cancel
Save