avformat: add av_stream_get_end_pts()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-05-19 20:16:01 +02:00
parent 91a8262b9d
commit 7f7080dc73
4 changed files with 14 additions and 3 deletions

View File

@ -32,8 +32,7 @@ API changes, most recent first:
2014-05-xx - xxxxxxx - lavf 55.17.1 - avformat.h 2014-05-xx - xxxxxxx - lavf 55.17.1 - avformat.h
Deprecate AVStream.pts and the AVFrac struct, which was its only use case. Deprecate AVStream.pts and the AVFrac struct, which was its only use case.
Those fields were poorly defined and not meant to be public, so there is See use av_stream_get_end_pts()
no replacement for them.
2014-05-18 - fd05602 - lavc 55.52.0 - avcodec.h 2014-05-18 - fd05602 - lavc 55.52.0 - avcodec.h
Add avcodec_free_context(). From now on it should be used for freeing Add avcodec_free_context(). From now on it should be used for freeing

View File

@ -1067,6 +1067,13 @@ typedef struct AVStream {
AVRational av_stream_get_r_frame_rate(const AVStream *s); AVRational av_stream_get_r_frame_rate(const AVStream *s);
void av_stream_set_r_frame_rate(AVStream *s, AVRational r); void av_stream_set_r_frame_rate(AVStream *s, AVRational r);
/**
* Returns the pts of the last muxed packet + its duration
*
* the retuned value is undefined when used with a demuxer.
*/
int64_t av_stream_get_end_pts(const AVStream *st);
#define AV_PROGRAM_RUNNING 1 #define AV_PROGRAM_RUNNING 1
/** /**

View File

@ -110,6 +110,11 @@ MAKE_ACCESSORS(AVFormatContext, format, int, metadata_header_padding)
MAKE_ACCESSORS(AVFormatContext, format, void *, opaque) MAKE_ACCESSORS(AVFormatContext, format, void *, opaque)
MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb) MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb)
int64_t av_stream_get_end_pts(const AVStream *st)
{
return st->pts.val;
}
void av_format_inject_global_side_data(AVFormatContext *s) void av_format_inject_global_side_data(AVFormatContext *s)
{ {
int i; int i;

View File

@ -30,7 +30,7 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVFORMAT_VERSION_MAJOR 55 #define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MINOR 39 #define LIBAVFORMAT_VERSION_MINOR 40
#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \