[FFmpeg-cvslog] avformat: add av_stream_get_parser() to access avformat AVParser
Michael Niedermayer
git at videolan.org
Mon Jul 14 23:37:52 CEST 2014
ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Mon Jul 14 21:03:43 2014 +0200| [9f8e3e6d1203e2b440ff3f7dbe90130a064963a1] | committer: Michael Niedermayer
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 at gmx.at>
(cherry picked from commit 62227a70f0a4c07d7ead5775d8bad64797f8ef80)
Conflicts:
RELEASE_NOTES
doc/APIchanges
libavformat/utils.c
libavformat/version.h
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9f8e3e6d1203e2b440ff3f7dbe90130a064963a1
---
libavformat/avformat.h | 1 +
libavformat/utils.c | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 7839c0a..1587059 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1005,6 +1005,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);
#define AV_PROGRAM_RUNNING 1
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4dc1d9c..75f6639 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -110,6 +110,11 @@ MAKE_ACCESSORS(AVFormatContext, format, int, metadata_header_padding)
MAKE_ACCESSORS(AVFormatContext, format, void *, opaque)
MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb)
+struct AVCodecParserContext *av_stream_get_parser(const AVStream *st)
+{
+ return st->parser;
+}
+
static AVCodec *find_decoder(AVFormatContext *s, AVStream *st, enum AVCodecID codec_id)
{
if (st->codec->codec)
More information about the ffmpeg-cvslog
mailing list