summaryrefslogtreecommitdiff
path: root/libavformat/mux_utils.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-05-06 17:02:55 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-05-10 07:32:13 +0200
commit08c14e67bb1422a1075812be211360acc177a826 (patch)
treee13fab4c56199e3311d6bc3825d9282730fcf785 /libavformat/mux_utils.c
parentd4455d37c4f110ace6f8344e5aad64fc5217947b (diff)
avformat/utils: Move av_stream_get_end_pts() to mux_utils.c
It is only to be used with muxers. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mux_utils.c')
-rw-r--r--libavformat/mux_utils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/mux_utils.c b/libavformat/mux_utils.c
index 5930a7911a..2fa2ab5b0f 100644
--- a/libavformat/mux_utils.c
+++ b/libavformat/mux_utils.c
@@ -29,6 +29,14 @@
#include "internal.h"
#include "mux.h"
+int64_t av_stream_get_end_pts(const AVStream *st)
+{
+ if (cffstream(st)->priv_pts) {
+ return cffstream(st)->priv_pts->val;
+ } else
+ return AV_NOPTS_VALUE;
+}
+
int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
int std_compliance)
{