Module: libav Branch: release/0.8 Commit: b473fdcde329dfbe6d099247f65f51436a49e8c6
Author: Paul B Mahol <[email protected]> Committer: Reinhard Tartler <[email protected]> Date: Wed Mar 21 00:10:18 2012 +0000 bytestream: add functions for accessing size of buffer Signed-off-by: Paul B Mahol <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> Signed-off-by: Justin Ruggles <[email protected]> CC:[email protected] (cherry picked from commit de9d2705f61ef569487ec5f8974a9c7ce34ec783) --- libavcodec/bytestream.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h index 6814620..091cab8 100644 --- a/libavcodec/bytestream.h +++ b/libavcodec/bytestream.h @@ -198,6 +198,16 @@ static av_always_inline int bytestream2_tell_p(PutByteContext *p) return (int)(p->buffer - p->buffer_start); } +static av_always_inline int bytestream2_size(GetByteContext *g) +{ + return (int)(g->buffer_end - g->buffer_start); +} + +static av_always_inline int bytestream2_size_p(PutByteContext *p) +{ + return (int)(p->buffer_end - p->buffer_start); +} + static av_always_inline int bytestream2_seek(GetByteContext *g, int offset, int whence) _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
