OCaml 4.14.0 rebuild
[arch-packages.git] / ffmpeg / repos / extra-x86_64 / add-av_stream_get_first_dts-for-chromium.patch
blobfb5589800d3d3bd59a42182496fe8eb862d6c4a9
1 From 95aab0fd83619408995720ce53d7a74790580220 Mon Sep 17 00:00:00 2001
2 From: "liberato@chromium.org" <liberato@chromium.org>
3 Date: Wed, 7 Jul 2021 19:01:22 -0700
4 Subject: [PATCH] Add av_stream_get_first_dts for Chromium
6 [foutrelis: adjust for new FFStream struct replacing AVStreamInternal]
7 ---
8 libavformat/avformat.h | 4 ++++
9 libavformat/utils.c | 7 +++++++
10 2 files changed, 11 insertions(+)
12 diff --git a/libavformat/avformat.h b/libavformat/avformat.h
13 index cd7b0d941c..b4a6dce885 100644
14 --- a/libavformat/avformat.h
15 +++ b/libavformat/avformat.h
16 @@ -1010,6 +1010,10 @@ struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
18 int64_t av_stream_get_end_pts(const AVStream *st);
20 +// Chromium: We use the internal field first_dts vvv
21 +int64_t av_stream_get_first_dts(const AVStream *st);
22 +// Chromium: We use the internal field first_dts ^^^
24 #define AV_PROGRAM_RUNNING 1
26 /**
27 diff --git a/libavformat/utils.c b/libavformat/utils.c
28 index de7580c32d..0ef0fe530e 100644
29 --- a/libavformat/utils.c
30 +++ b/libavformat/utils.c
31 @@ -121,6 +121,13 @@ int64_t av_stream_get_end_pts(const AVStream *st)
32 return AV_NOPTS_VALUE;
35 +// Chromium: We use the internal field first_dts vvv
36 +int64_t av_stream_get_first_dts(const AVStream *st)
38 + return cffstream(st)->first_dts;
40 +// Chromium: We use the internal field first_dts ^^^
42 struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
44 return st->internal->parser;