File add-av_stream_get_first_dts-for-chromium.patch of Package ffmpeg

diff -ru ffmpeg-8.0.clean/libavformat/avformat.h ffmpeg-8.0/libavformat/avformat.h
--- ffmpeg-8.0.clean/libavformat/avformat.h	2025-08-22 12:24:19.000000000 +0300
+++ ffmpeg-8.0/libavformat/avformat.h	2025-11-19 10:27:44.045858655 +0300
@@ -1179,6 +1179,10 @@
 
 struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
 
+// 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 -ru ffmpeg-8.0.clean/libavformat/mux_utils.c ffmpeg-8.0/libavformat/mux_utils.c
--- ffmpeg-8.0.clean/libavformat/mux_utils.c	2025-08-22 12:24:19.000000000 +0300
+++ ffmpeg-8.0/libavformat/mux_utils.c	2025-11-19 10:28:21.282118578 +0300
@@ -29,6 +29,13 @@
 #include "internal.h"
 #include "mux.h"
 
+// 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)
 {
openSUSE Build Service is sponsored by