2023-11-11 14:10:58 +00:00
|
|
|
From d32aacab65a322b66d6a1b48f6cdb03e42bde0f9 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Frank Liberato <liberato@chromium.org>
|
|
|
|
Date: Wed, 7 Jul 2021 19:01:22 -0700
|
|
|
|
Subject: [PATCH] Add av_stream_get_first_dts for Chromium
|
|
|
|
|
|
|
|
---
|
|
|
|
libavformat/avformat.h | 4 ++++
|
|
|
|
libavformat/utils.c | 7 +++++++
|
|
|
|
2 files changed, 11 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
|
|
|
|
index 1916aa2dc5..e6682849fa 100644
|
|
|
|
--- a/libavformat/avformat.h
|
|
|
|
+++ b/libavformat/avformat.h
|
2024-09-06 11:40:18 +00:00
|
|
|
@@ -1170,6 +1170,10 @@ typedef struct AVStreamGroup {
|
|
|
|
|
|
|
|
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
|
|
|
|
|
2023-11-11 14:10:58 +00:00
|
|
|
+// 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
|
2024-09-06 11:40:18 +00:00
|
|
|
|
2023-11-11 14:10:58 +00:00
|
|
|
/**
|
|
|
|
diff --git a/libavformat/utils.c b/libavformat/utils.c
|
|
|
|
index cf4d68bff9..7d750abf88 100644
|
|
|
|
--- a/libavformat/utils.c
|
|
|
|
+++ b/libavformat/utils.c
|
2024-09-06 11:40:18 +00:00
|
|
|
@@ -56,6 +56,13 @@ int ff_unlock_avformat(void)
|
2023-11-11 14:10:58 +00:00
|
|
|
return ff_mutex_unlock(&avformat_mutex) ? -1 : 0;
|
|
|
|
}
|
2024-09-06 11:40:18 +00:00
|
|
|
|
2023-11-11 14:10:58 +00:00
|
|
|
+// Chromium: We use the internal field first_dts vvv
|
|
|
|
+int64_t av_stream_get_first_dts(const AVStream *st)
|
|
|
|
+{
|
2024-09-06 11:40:18 +00:00
|
|
|
+ return cffstream(st)->first_dts;
|
2023-11-11 14:10:58 +00:00
|
|
|
+}
|
|
|
|
+// Chromium: We use the internal field first_dts ^^^
|
|
|
|
+
|
|
|
|
/* an arbitrarily chosen "sane" max packet size -- 50M */
|
|
|
|
#define SANE_CHUNK_SIZE (50000000)
|
2024-09-06 11:40:18 +00:00
|
|
|
|
2023-11-11 14:10:58 +00:00
|
|
|
--
|
|
|
|
2.41.0
|
|
|
|
|