ffmpeg: add patch for chromium

This commit is contained in:
git-bruh 2022-03-31 20:25:34 +05:30
parent 176448a6e9
commit cfa116534f
No known key found for this signature in database
GPG Key ID: E1475C50075ADCE6
5 changed files with 38 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#!/bin/sh -e
patch -p1 < add-av_stream_get_first_dts-for-chromium.patch
./configure \
--cc="$CC" \
--cxx="$CXX" \

View File

@ -1 +1,2 @@
51e919f7d205062c0fd4fae6243a84850391115104ccf1efc451733bc0ac7298
29ce1c530fbbd0d2a258da0da2b49087b99ca039574a588b3fd5349bc769e01e

View File

@ -0,0 +1,33 @@
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 6ce367e..cba3f5e 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1115,6 +1115,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 e643821..50ba6af 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -92,6 +92,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 cffstream(st)->parser;

View File

@ -1 +1,2 @@
https://ffmpeg.org/releases/ffmpeg-VERSION.tar.xz
patches/add-av_stream_get_first_dts-for-chromium.patch

View File

@ -1 +1 @@
5.0 1
5.0 2