<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/eab8fc421e1db4093d2a31cd96bfe5379944ec40">https://github.com/macports/macports-ports/commit/eab8fc421e1db4093d2a31cd96bfe5379944ec40</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new eab8fc421e1 ffmpeg-devel: fix videotoolbox encoding error: invalid DTS Upstream issue: https://trac.ffmpeg.org/ticket/9439 See: https://trac.macports.org/ticket/64022
</span>eab8fc421e1 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit eab8fc421e1db4093d2a31cd96bfe5379944ec40
</span>Author: Christopher Nielsen <mascguy@github.com>
AuthorDate: Sat Dec 11 10:09:26 2021 -0500
<span style='display:block; white-space:pre;color:#404040;'> ffmpeg-devel: fix videotoolbox encoding error: invalid DTS
</span><span style='display:block; white-space:pre;color:#404040;'> Upstream issue: https://trac.ffmpeg.org/ticket/9439
</span><span style='display:block; white-space:pre;color:#404040;'> See: https://trac.macports.org/ticket/64022
</span>---
multimedia/ffmpeg-devel/Portfile | 17 +++++++++++------
...oxenc.c.diff => patch-issue-9231-max_b_frames.diff} | 0
.../files/patch-issue-9439-non-b-frame-encoding.diff | 18 ++++++++++++++++++
3 files changed, 29 insertions(+), 6 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/multimedia/ffmpeg-devel/Portfile b/multimedia/ffmpeg-devel/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 769e314d5b4..2c0be7a5e13 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/multimedia/ffmpeg-devel/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/multimedia/ffmpeg-devel/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -94,17 +94,22 @@ depends_lib port:lame \
</span> port:xz \
port:zlib
<span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles patch-libavcodec-audiotoolboxenc.c.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-libavcodec-audiotoolboxenc.c.diff
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# fix an upstream bug that overrides the max_b_frames setting
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Patch for upstream bug related to max_b_frames setting
</span> # https://trac.ffmpeg.org/ticket/9231
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# this bug is fixed upstream in commit 55d9d6767967794edcdd6e1bbd8840fc6f4e9315
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# and should therefore be available in the next release version.
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles-append patch-libavcodec-videotoolboxenc.c.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Fixed via upstream commit: 55d9d6767967794edcdd6e1bbd8840fc6f4e9315
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Will be available in the next release version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-issue-9231-max_b_frames.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Patch for upstream bug related to non-B-frame encoding
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://trac.ffmpeg.org/ticket/9439
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Fixed via upstream commit: b786bc7433dfe082441a57c1ba9ae9ea47904b78
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Will be available in the next release version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-issue-9439-non-b-frame-encoding.diff
</span>
# enable auto configure of asm optimizations
# requires Xcode 3.1 or better on Leopard
<span style='display:block; white-space:pre;background:#ffe0e0;'>-#
</span> minimum_xcodeversions {9 3.1}
# requires a C11 compiler
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/multimedia/ffmpeg-devel/files/patch-libavcodec-videotoolboxenc.c.diff b/multimedia/ffmpeg-devel/files/patch-issue-9231-max_b_frames.diff
</span>similarity index 100%
rename from multimedia/ffmpeg-devel/files/patch-libavcodec-videotoolboxenc.c.diff
rename to multimedia/ffmpeg-devel/files/patch-issue-9231-max_b_frames.diff
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/multimedia/ffmpeg-devel/files/patch-issue-9439-non-b-frame-encoding.diff b/multimedia/ffmpeg-devel/files/patch-issue-9439-non-b-frame-encoding.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..25fa01d79ae
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/multimedia/ffmpeg-devel/files/patch-issue-9439-non-b-frame-encoding.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,18 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- libavcodec/videotoolboxenc.c.orig 2021-12-11 09:44:23.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libavcodec/videotoolboxenc.c 2021-12-11 09:42:05.000000000 -0500
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+avcodec/videotoolboxenc: Fix non-B-Frame encoding
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+* Sets vtctx->has_b_frames to 0 if the VideoToolbox compression session will not emit B-frames (and, in consequence, no valid DTSs).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+* Required for the handling of invalid DTSs in 'vtenc_cm_to_avpacket' (line 2018ff) to work correctly and not abort encoding with "DTS is invalid" when no B-frames are generated.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+* See: https://trac.ffmpeg.org/ticket/9439
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1516,7 +1516,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!status && has_b_frames_cfbool) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ //Some devices don't output B-frames for main profile, even if requested.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // HEVC has b-pyramid
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- vtctx->has_b_frames = (CFBooleanGetValue(has_b_frames_cfbool) && avctx->codec_id == AV_CODEC_ID_HEVC) ? 2 : 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (CFBooleanGetValue(has_b_frames_cfbool))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ vtctx->has_b_frames = avctx->codec_id == AV_CODEC_ID_HEVC ? 2 : 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ vtctx->has_b_frames = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CFRelease(has_b_frames_cfbool);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ avctx->has_b_frames = vtctx->has_b_frames;
</span></pre><pre style='margin:0'>
</pre>