2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-12-25 08:40:10 -07:00
repo/extra/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch
2022-03-31 20:28:31 +05:30

34 lines
1.0 KiB
Diff

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 6ce367e..cba3f5e 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1115,6 +1115,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/utils.c b/libavformat/utils.c
index e643821..50ba6af 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -92,6 +92,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 ^^^
+
struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
{
return cffstream(st)->parser;