public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Than Ngo <than@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/chromium] epel9-next: Drop ffmpeg-5.x-reordered_opaque patch as it's merged in upstream
Date: Fri, 07 Aug 2026 16:08:08 GMT	[thread overview]
Message-ID: <178611888818.1.1195850002746237502.rpms-chromium-1d84b0f57e2d@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/chromium
Branch : epel9-next
Commit : 1d84b0f57e2d73ecf487476346977c12e9fdeca0
Author : Than Ngo <than@redhat.com>
Date   : 2025-09-04T12:15:28+02:00
Stats  : +0/-107 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/chromium/c/1d84b0f57e2d73ecf487476346977c12e9fdeca0?branch=epel9-next

Log:
Drop ffmpeg-5.x-reordered_opaque patch as it's merged in upstream

---
diff --git a/chromium-125-ffmpeg-5.x-reordered_opaque.patch b/chromium-125-ffmpeg-5.x-reordered_opaque.patch
deleted file mode 100644
index 9aff864..0000000
--- a/chromium-125-ffmpeg-5.x-reordered_opaque.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-commit 62274859104bd828373ae406aa9309e610449ac5
-Author: Ted Meyer <tmathmeyer@chromium.org>
-Date:   Fri Mar 22 19:56:55 2024 +0000
-
-    Replace deprecated use of AVCodecContext::reordered_opaque
-    
-    We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context
-    now to trigger timestamp propagation.
-    
-    Bug: 330573128
-    Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858
-    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308
-    Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
-    Reviewed-by: Dan Sanders <sandersd@chromium.org>
-    Cr-Commit-Position: refs/heads/main@{#1277051}
-
-diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
-index bd75477feeabb..8a658a58caac5 100644
---- a/media/filters/ffmpeg_video_decoder.cc
-+++ b/media/filters/ffmpeg_video_decoder.cc
-@@ -134,7 +134,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
- }
- 
- FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log)
--    : media_log_(media_log) {
-+    : media_log_(media_log), timestamp_map_(128) {
-   DVLOG(1) << __func__;
-   DETACH_FROM_SEQUENCE(sequence_checker_);
- }
-@@ -363,8 +363,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) {
-     DCHECK(packet->data);
-     DCHECK_GT(packet->size, 0);
- 
--    // Let FFmpeg handle presentation timestamp reordering.
--    codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds();
-+    const int64_t timestamp = buffer.timestamp().InMicroseconds();
-+    const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId();
-+    timestamp_map_.Put(std::make_pair(timestamp_id, timestamp));
-+    packet->opaque = reinterpret_cast<void*>(timestamp_id.GetUnsafeValue());
-   }
-   FFmpegDecodingLoop::DecodeStatus decode_status = decoding_loop_->DecodePacket(
-       packet, base::BindRepeating(&FFmpegVideoDecoder::OnNewFrame,
-@@ -423,7 +425,12 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) {
-   }
-   gfx::Size natural_size = aspect_ratio.GetNaturalSize(visible_rect);
- 
--  const auto pts = base::Microseconds(frame->reordered_opaque);
-+  const auto ts_id = TimestampId(reinterpret_cast<size_t>(frame->opaque));
-+  const auto ts_lookup = timestamp_map_.Get(ts_id);
-+  if (ts_lookup == timestamp_map_.end()) {
-+    return false;
-+  }
-+  const auto pts = base::Microseconds(std::get<1>(*ts_lookup));
-   auto video_frame = VideoFrame::WrapExternalDataWithLayout(
-       opaque->layout, visible_rect, natural_size, opaque->data, opaque->size,
-       pts);
-@@ -498,8 +505,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
-   codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config);
-   codec_context_->thread_type =
-       FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME);
-+
-   codec_context_->opaque = this;
-   codec_context_->get_buffer2 = GetVideoBufferImpl;
-+  codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE;
- 
-   if (base::FeatureList::IsEnabled(kFFmpegAllowLists)) {
-     // Note: FFmpeg will try to free this string, so we must duplicate it.
-diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
-index d02cb89c3ddf7..0a2de1c623fff 100644
---- a/media/filters/ffmpeg_video_decoder.h
-+++ b/media/filters/ffmpeg_video_decoder.h
-@@ -7,10 +7,12 @@
- 
- #include <memory>
- 
-+#include "base/containers/lru_cache.h"
- #include "base/functional/callback.h"
- #include "base/memory/raw_ptr.h"
- #include "base/memory/scoped_refptr.h"
- #include "base/sequence_checker.h"
-+#include "base/types/id_type.h"
- #include "media/base/frame_buffer_pool.h"
- #include "media/base/supported_video_decoder_config.h"
- #include "media/base/video_decoder.h"
-@@ -87,6 +89,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
-   // FFmpeg structures owned by this object.
-   std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
- 
-+  // The gist here is that timestamps need to be 64 bits to store microsecond
-+  // precision. A 32 bit integer would overflow at ~35 minutes at this level of
-+  // precision. We can't cast the timestamp to the void ptr object used by the
-+  // opaque field in ffmpeg then, because it would lose data on a 32 bit build.
-+  // However, we don't actually have 2^31 timestamped frames in a single
-+  // playback, so it's fine to use the 32 bit value as a key in a map which
-+  // contains the actual timestamps. Additionally, we've in the past set 128
-+  // outstanding frames for re-ordering as a limit for cross-thread decoding
-+  // tasks, so we'll do that here too with the LRU cache.
-+  using TimestampId = base::IdType<int64_t, size_t, 0>;
-+
-+  TimestampId::Generator timestamp_id_generator_;
-+  base::LRUCache<TimestampId, int64_t> timestamp_map_;
-+
-   VideoDecoderConfig config_;
- 
-   scoped_refptr<FrameBufferPool> frame_pool_;

diff --git a/chromium.spec b/chromium.spec
index 42d9e2c..6f293d6 100644
--- a/chromium.spec
+++ b/chromium.spec
@@ -280,7 +280,6 @@ Patch92: chromium-138-checkversion-nodejs.patch
 # system ffmpeg
 # need for old ffmpeg 5.x on epel9
 Patch128: chromium-138-el9-ffmpeg-deprecated-apis.patch
-Patch129: chromium-125-ffmpeg-5.x-reordered_opaque.patch
 Patch130: chromium-107-ffmpeg-5.x-duration.patch
 # disable the check
 Patch131: chromium-107-proprietary-codecs.patch
@@ -963,7 +962,6 @@ Qt6 UI for chromium.
 %if ! %{bundleffmpegfree}
 %if 0%{?rhel} == 9
 %patch -P128 -p1 -b .el9-ffmpeg-deprecated-apis
-%patch -P129 -p1 -R -b .ffmpeg-5.x-reordered_opaque
 %patch -P130 -p1 -b .ffmpeg-5.x-duration
 %patch -P133 -p1 -b .el9-ffmpeg-5.1.x
 %endif

                 reply	other threads:[~2026-08-07 16:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178611888818.1.1195850002746237502.rpms-chromium-1d84b0f57e2d@fedoraproject.org \
    --to=than@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox