summaryrefslogtreecommitdiff
path: root/repo/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
committerdavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
commit48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch)
tree00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch
parent871b2b573f01c1b3176a0f65458b3d281b41c437 (diff)
removed idea of repos
Diffstat (limited to 'repo/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch')
-rw-r--r--repo/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/repo/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch b/repo/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch
new file mode 100644
index 0000000..1ba7b76
--- /dev/null
+++ b/repo/ffmpeg/add-av_stream_get_first_dts-for-chromium.patch
@@ -0,0 +1,45 @@
+Patch-Source: https://github.com/archlinux/svntogit-packages/blob/afdf00ac125851675c1599ab46545f6c58cfb655/trunk/add-av_stream_get_first_dts-for-chromium.patch
+From 95aab0fd83619408995720ce53d7a74790580220 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
+
+[foutrelis: adjust for new FFStream struct replacing AVStreamInternal]
+---
+ libavformat/avformat.h | 4 ++++
+ libavformat/utils.c | 7 +++++++
+ 2 files changed, 11 insertions(+)
+
+diff --git a/libavformat/avformat.h b/libavformat/avformat.h
+index cd7b0d941c..b4a6dce885 100644
+--- a/libavformat/avformat.h
++++ b/libavformat/avformat.h
+@@ -1010,6 +1010,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 de7580c32d..0ef0fe530e 100644
+--- a/libavformat/utils.c
++++ b/libavformat/utils.c
+@@ -121,6 +121,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 st->internal->parser;