2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-11-16 03:30:23 -07:00
repo/extra/ffmpeg/patches/add-av_stream_get_first_dts-for-chromium.patch

30 lines
815 B
Diff
Raw Normal View History

2022-03-31 08:55:34 -06:00
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
2023-03-11 15:02:44 -07:00
index 1916aa2..43aa2dd 100644
2022-03-31 08:55:34 -06:00
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
2023-03-11 15:02:44 -07:00
@@ -1019,6 +1019,8 @@ attribute_deprecated
2022-03-31 08:55:34 -06:00
int64_t av_stream_get_end_pts(const AVStream *st);
2023-03-11 15:02:44 -07:00
#endif
2022-03-31 08:55:34 -06:00
+int64_t av_stream_get_first_dts(const AVStream *st);
+
#define AV_PROGRAM_RUNNING 1
/**
2022-07-22 14:00:15 -06:00
diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c
2023-03-11 15:02:44 -07:00
index 3e63b80..758d985 100644
2022-07-22 14:00:15 -06:00
--- a/libavformat/mux_utils.c
+++ b/libavformat/mux_utils.c
2023-03-11 15:02:44 -07:00
@@ -40,6 +40,11 @@ int64_t av_stream_get_end_pts(const AVStream *st)
2022-03-31 08:55:34 -06:00
}
2023-03-11 15:02:44 -07:00
#endif
2022-03-31 08:55:34 -06:00
+int64_t av_stream_get_first_dts(const AVStream *st)
+{
2023-03-11 15:02:44 -07:00
+ return cffstream(st)->first_dts;
2022-03-31 08:55:34 -06:00
+}
+
2022-07-22 14:00:15 -06:00
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
int std_compliance)
2022-03-31 08:55:34 -06:00
{