From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: "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) {