git: d4d975cffa33 - main - multimedia/ffmpeg: Import compatibility patch for qt5-webengine

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Thu, 27 Apr 2023 12:04:30 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d4d975cffa333bd1b88fcdaf1f0c8f3aa79728b9

commit d4d975cffa333bd1b88fcdaf1f0c8f3aa79728b9
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2023-04-27 11:22:52 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-04-27 12:01:46 +0000

    multimedia/ffmpeg: Import compatibility patch for qt5-webengine
    
    Add symbol for "av_stream_get_first_dts" to ffmpeg
    
    PR:             270209
---
 ...h-add-av_stream_get_first_dts-for-qt5-webengine | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/multimedia/ffmpeg/files/patch-add-av_stream_get_first_dts-for-qt5-webengine b/multimedia/ffmpeg/files/patch-add-av_stream_get_first_dts-for-qt5-webengine
new file mode 100644
index 000000000000..936cd1d90f26
--- /dev/null
+++ b/multimedia/ffmpeg/files/patch-add-av_stream_get_first_dts-for-qt5-webengine
@@ -0,0 +1,35 @@
+Add "av_stream_get_first_dts" symbol for www/qt5-webengine
+
+Obtained from:
+
+https://github.com/archlinux/svntogit-packages/blob/packages/ffmpeg/trunk/add-av_stream_get_first_dts-for-chromium.patch
+
+--- libavformat/avformat.h.orig	2023-02-27 20:43:45 UTC
++++ libavformat/avformat.h
+@@ -1019,6 +1019,10 @@ int64_t    av_stream_get_end_pts(const AVStream *st);
+ int64_t    av_stream_get_end_pts(const AVStream *st);
+ #endif
+ 
++// 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
+ 
+ /**
+--- libavformat/mux_utils.c.orig	2023-02-27 20:43:45 UTC
++++ libavformat/mux_utils.c
+@@ -40,6 +40,13 @@ int64_t av_stream_get_end_pts(const AVStream *st)
+ }
+ #endif
+ 
++// 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 ^^^
++
+ int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
+                          int std_compliance)
+ {