diff options
author | Mark Thompson <sw@jkqxz.net> | 2020-11-23 17:53:57 +0000 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2020-11-24 10:13:55 +0200 |
commit | 7bacf60ae5df75954a538563d19f6001aa598b3f (patch) | |
tree | 427140162bd5a0c14bd1abff745c910524425a73 /libavcodec/cbs.h | |
parent | 01eb05207cbbe44e4c58a15894d49ff81a465a37 (diff) |
cbs: Add function to read extradata from an AVCodecContext
This is useful in decoders and parsers, matching the way that bitstream
filters read extradata from AVCodecParameters.
Diffstat (limited to 'libavcodec/cbs.h')
-rw-r--r-- | libavcodec/cbs.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/cbs.h b/libavcodec/cbs.h index 635921b11e..3fd0a0ef33 100644 --- a/libavcodec/cbs.h +++ b/libavcodec/cbs.h @@ -263,6 +263,17 @@ int ff_cbs_read_extradata(CodedBitstreamContext *ctx, const AVCodecParameters *par); /** + * Read the extradata bitstream found in a codec context into a + * fragment, then split into units and decompose. + * + * This acts identical to ff_cbs_read_extradata() for the case where + * you already have a codec context. + */ +int ff_cbs_read_extradata_from_codec(CodedBitstreamContext *ctx, + CodedBitstreamFragment *frag, + const AVCodecContext *avctx); + +/** * Read the data bitstream from a packet into a fragment, then * split into units and decompose. * |