avformat: add av_stream_get_parser() to access avformat AVParser

The AVStream.parser field is considered private and its location cannot be
preserved while preserving also ABI compatibility to libav, as libav added fields
before it.
Some tools like ffmpeg.c access this field though

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/77/merge
Michael Niedermayer 11 years ago
parent 6821572499
commit 62227a70f0
  1. 2
      RELEASE_NOTES
  2. 3
      doc/APIchanges
  3. 1
      libavformat/avformat.h
  4. 5
      libavformat/utils.c
  5. 2
      libavformat/version.h

@ -33,7 +33,7 @@
• libavutil 52.92.100
• libavcodec 55.69.100
• libavformat 55.46.100
• libavformat 55.47.100
• libavdevice 55.13.102
• libavfilter 4.10.100
• libswscale 2. 6.100

@ -15,6 +15,9 @@ libavutil: 2012-10-22
API changes, most recent first:
2014-07-14 - xxxxxxx - lavf 55.47.100 - avformat.h
Add av_stream_get_parser()
2014-07-xx - xxxxxxx - lavu 53.18.0 - display.h
Add av_display_matrix_flip() to flip the transformation matrix.

@ -1069,6 +1069,7 @@ typedef struct AVStream {
AVRational av_stream_get_r_frame_rate(const AVStream *s);
void av_stream_set_r_frame_rate(AVStream *s, AVRational r);
struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
/**
* Returns the pts of the last muxed packet + its duration

@ -115,6 +115,11 @@ int64_t av_stream_get_end_pts(const AVStream *st)
return st->pts.val;
}
struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
{
return st->parser;
}
void av_format_inject_global_side_data(AVFormatContext *s)
{
int i;

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

Loading…
Cancel
Save