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
32 32
332014-05-xx - xxxxxxx - lavf 55.17.1 - avformat.h332014-05-xx - xxxxxxx - lavf 55.17.1 - avformat.h
34 Deprecate AVStream.pts and the AVFrac struct, which was its only use case.34 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 is35 See use av_stream_get_end_pts()
36 no replacement for them.
37 36
382014-05-18 - fd05602 - lavc 55.52.0 - avcodec.h372014-05-18 - fd05602 - lavc 55.52.0 - avcodec.h
39 Add avcodec_free_context(). From now on it should be used for freeing38 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
1067AVRational av_stream_get_r_frame_rate(const AVStream *s);1067AVRational av_stream_get_r_frame_rate(const AVStream *s);
1068void av_stream_set_r_frame_rate(AVStream *s, AVRational r);1068void av_stream_set_r_frame_rate(AVStream *s, AVRational r);
1069 1069
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 */
1075int64_t av_stream_get_end_pts(const AVStream *st);
1076
1070#define AV_PROGRAM_RUNNING 11077#define AV_PROGRAM_RUNNING 1
1071 1078
1072/**1079/**
libavformat/utils.c+5−0
@@ -110,6 +110,11 @@ MAKE_ACCESSORS(AVFormatContext, format, int, metadata_header_padding) · 109 unmodified lines
110MAKE_ACCESSORS(AVFormatContext, format, void *, opaque)110MAKE_ACCESSORS(AVFormatContext, format, void *, opaque)
111MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb)111MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb)
112 112
113int64_t av_stream_get_end_pts(const AVStream *st)
114{
115 return st->pts.val;
116}
117
113void av_format_inject_global_side_data(AVFormatContext *s)118void av_format_inject_global_side_data(AVFormatContext *s)
114{119{
115 int i;120 int i;
libavformat/version.h+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30#include "libavutil/version.h"30#include "libavutil/version.h"
31 31
32#define LIBAVFORMAT_VERSION_MAJOR 5532#define LIBAVFORMAT_VERSION_MAJOR 55
33#define LIBAVFORMAT_VERSION_MINOR 3933#define LIBAVFORMAT_VERSION_MINOR 40
34#define LIBAVFORMAT_VERSION_MICRO 10034#define LIBAVFORMAT_VERSION_MICRO 100
35 35
36#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \36#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