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>
(cherry picked from commit 62227a70f0)

Conflicts:

	RELEASE_NOTES
	doc/APIchanges
	libavformat/utils.c
	libavformat/version.h
(cherry picked from commit a78e6363e9a7ef90bd1ff4aeceee8e5501cbc6d4)

Conflicts:

	libavformat/utils.c
This commit is contained in:
Michael Niedermayer
2014-07-14 21:03:43 +02:00
parent dd72df9845
commit c2af6b500b
2 changed files with 6 additions and 0 deletions

View File

@@ -103,6 +103,11 @@ static int64_t wrap_timestamp(AVStream *st, int64_t timestamp)
MAKE_ACCESSORS(AVStream, stream, AVRational, r_frame_rate)
struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
{
return st->parser;
}
/* an arbitrarily chosen "sane" max packet size -- 50M */
#define SANE_CHUNK_SIZE (50000000)