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) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
969d8b9d60
commit
ab6dd7fea9
@ -892,6 +892,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
|
||||
|
||||
|
@ -102,6 +102,11 @@ MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, video_codec)
|
||||
MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, audio_codec)
|
||||
MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, subtitle_codec)
|
||||
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user