History

avformat: add av_stream_get_end_pts()

Michael Niedermayer committed 12 years ago

Commit 7f7080d1 parent 91a82624 files · +14 −3Browse files

Unified · Split

4 files
  1. doc/APIchanges +1 −2
  2. libavformat/avformat.h +7 −0
  3. libavformat/utils.c +5 −0
  4. libavformat/version.h +1 −1
doc/APIchanges+1−2
@@ -32,8 +32,7 @@ API changes, most recent first: · 31 unmodified lines
3232
3333 2014-05-xx - xxxxxxx - lavf 55.17.1 - avformat.h
3434 Deprecate AVStream.pts and the AVFrac struct, which was its only use case.
35− Those fields were poorly defined and not meant to be public, so there is
36− no replacement for them.
35+ See use av_stream_get_end_pts()
3736
3837 2014-05-18 - fd05602 - lavc 55.52.0 - avcodec.h
3938 Add avcodec_free_context(). From now on it should be used for freeing
libavformat/avformat.h+7−0
@@ -1067,6 +1067,13 @@ typedef struct AVStream { · 1066 unmodified lines
10671067 AVRational av_stream_get_r_frame_rate(const AVStream *s);
10681068 void av_stream_set_r_frame_rate(AVStream *s, AVRational r);
10691069
1070+/**
1071+ * Returns the pts of the last muxed packet + its duration
1072+ *
1073+ * the retuned value is undefined when used with a demuxer.
1074+ */
1075+int64_t av_stream_get_end_pts(const AVStream *st);
1076+
10701077 #define AV_PROGRAM_RUNNING 1
10711078
10721079 /**
libavformat/utils.c+5−0
@@ -110,6 +110,11 @@ MAKE_ACCESSORS(AVFormatContext, format, int, metadata_header_padding) · 109 unmodified lines
110110 MAKE_ACCESSORS(AVFormatContext, format, void *, opaque)
111111 MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb)
112112
113+int64_t av_stream_get_end_pts(const AVStream *st)
114+{
115+ return st->pts.val;
116+}
117+
113118 void av_format_inject_global_side_data(AVFormatContext *s)
114119 {
115120 int i;
libavformat/version.h+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
3030 #include "libavutil/version.h"
3131
3232 #define LIBAVFORMAT_VERSION_MAJOR 55
33−#define LIBAVFORMAT_VERSION_MINOR 39
33+#define LIBAVFORMAT_VERSION_MINOR 40
3434 #define LIBAVFORMAT_VERSION_MICRO 100
3535
3636 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t