diff options
author | Jan Sebechlebsky <sebechlebskyjan@gmail.com> | 2016-07-28 18:18:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-13 12:46:18 +0200 |
commit | 7ae52f8a6b4a137f79b032b7094b3d5867839d52 (patch) | |
tree | 37983483de0994f74168b16ae5d2e4305fb7fff2 /libavcodec/bsf.h | |
parent | 79dc94a63b30369e39792e81cb032f2cf40539b4 (diff) | |
download | ffmpeg-7ae52f8a6b4a137f79b032b7094b3d5867839d52.tar.gz |
avcodec/bsf: Add ff_bsf_get_packet_ref() function
Use of this function can save unnecessary malloc operation
in bitstream filter.
Signed-off-by: Jan Sebechlebsky <sebechlebskyjan@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/bsf.h')
-rw-r--r-- | libavcodec/bsf.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/bsf.h b/libavcodec/bsf.h index 3435df5d86..af035eee44 100644 --- a/libavcodec/bsf.h +++ b/libavcodec/bsf.h @@ -28,6 +28,17 @@ */ int ff_bsf_get_packet(AVBSFContext *ctx, AVPacket **pkt); +/** + * Called by bitstream filters to get packet for filtering. + * The reference to packet is moved to provided packet structure. + * + * @param ctx pointer to AVBSFContext of filter + * @param pkt pointer to packet to move reference to + * + * @return 0>= on success, negative AVERROR in case of failure + */ +int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt); + const AVClass *ff_bsf_child_class_next(const AVClass *prev); #endif /* AVCODEC_BSF_H */ |