summaryrefslogtreecommitdiff
path: root/libavcodec/cbs.h
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2021-08-05 11:59:55 -0300
committerJames Almer <jamrial@gmail.com>2021-08-14 23:06:38 -0300
commite680c5c344683d4a0d3a8b5c976ca56baf21b8bd (patch)
tree7851bb146102de271feed1470cf247ad6addb9ef /libavcodec/cbs.h
parent087fbfe5bc2272aa1cfd9f4c49438436b68a1ddc (diff)
downloadffmpeg-e680c5c344683d4a0d3a8b5c976ca56baf21b8bd.tar.gz
avcodec/cbs: add a helper to read extradata within packet side data
Using ff_cbs_read() on the raw buffer will not parse it as extradata, resulting in parsing errors for example when handling ISOBMFF avcC. This helper works around that. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/cbs.h')
-rw-r--r--libavcodec/cbs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/cbs.h b/libavcodec/cbs.h
index b7acf98347..bd97d163b1 100644
--- a/libavcodec/cbs.h
+++ b/libavcodec/cbs.h
@@ -276,6 +276,10 @@ int ff_cbs_read_extradata_from_codec(CodedBitstreamContext *ctx,
CodedBitstreamFragment *frag,
const struct AVCodecContext *avctx);
+int ff_cbs_read_packet_side_data(CodedBitstreamContext *ctx,
+ CodedBitstreamFragment *frag,
+ const AVPacket *pkt);
+
/**
* Read the data bitstream from a packet into a fragment, then
* split into units and decompose.