diff -Naur a/libavformat/avformat.h b/libavformat/avformat.h
--- a/libavformat/avformat.h	2024-04-05 05:23:00.000000000 +0600
+++ b/libavformat/avformat.h	2024-07-17 17:51:20.156314168 +0600
@@ -1170,6 +1170,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 -Naur a/libavformat/mux_utils.c b/libavformat/mux_utils.c
--- a/libavformat/mux_utils.c	2024-04-05 05:23:00.000000000 +0600
+++ b/libavformat/mux_utils.c	2024-07-17 17:52:26.337981552 +0600
@@ -30,6 +30,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)
 {