2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-07-04 15:02:27 +00:00
repo/extra/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch
2022-07-22 15:00:15 -05:00

34 lines
1.1 KiB
Diff

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index f12fa7d..0b9fd1f 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1128,6 +1128,10 @@ struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
*/
int64_t av_stream_get_end_pts(const AVStream *st);
+// 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 eb8ea3d..8420934 100644
--- a/libavformat/mux_utils.c
+++ b/libavformat/mux_utils.c
@@ -37,6 +37,13 @@ int64_t av_stream_get_end_pts(const AVStream *st)
return AV_NOPTS_VALUE;
}
+// 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)
{