blob: 4bb02e4a9aaa475d3a7f08eb8b2d0bdd29ce2190 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "liberato@chromium.org" <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/mux_utils.c | 7 +++++++
2 files changed, 11 insertions(+)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 56c1c8028996..75221d9d1a1e 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1202,6 +1202,10 @@ typedef struct AVStreamGroup {
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
+// 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 ed1242a6a28f..7c04d4b9f269 100644
--- a/libavformat/mux_utils.c
+++ b/libavformat/mux_utils.c
@@ -30,6 +30,13 @@
#include "internal.h"
#include "mux.h"
+// 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)
{
|