vcpkg/ports/ffmpeg/0040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch
Alexander Neumann 9828b5b935
[FFmpeg] chromium patch (#38683)
Required to build qtwebengine and probably chromium itself with ffmpeg
on linux-dynamic
2024-05-27 23:10:28 -07:00

36 lines
1.1 KiB
Diff

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index cd7b0d941c..b4a6dce885 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1010,7 +1010,11 @@ struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
attribute_deprecated
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
/**
diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c
index de7580c32d..0ef0fe530e 100644
--- a/libavformat/mux_utils.c
+++ b/libavformat/mux_utils.c
@@ -33,7 +33,14 @@ int64_t av_stream_get_end_pts(const AVStream *st)
return AV_NOPTS_VALUE;
}
#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)
{