aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-14 21:03:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-14 21:45:51 +0200
commitc2af6b500bcf5bf59380c404b77edeb0c6eb46a2 (patch)
tree8556bf75d9024103d1fb38b0b44739127c4c31ce /libavformat/utils.c
parentdd72df9845d0687d03be6a5b830c8ed84edaa907 (diff)
downloadffmpeg-c2af6b500bcf5bf59380c404b77edeb0c6eb46a2.tar.gz
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 62227a70f0a4c07d7ead5775d8bad64797f8ef80) Conflicts: RELEASE_NOTES doc/APIchanges libavformat/utils.c libavformat/version.h (cherry picked from commit a78e6363e9a7ef90bd1ff4aeceee8e5501cbc6d4) Conflicts: libavformat/utils.c
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 3280a0d214..4cb0adfdfe 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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)