diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-03-21 00:10:18 +0000 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2014-04-12 14:49:08 -0400 |
commit | de9d2705f61ef569487ec5f8974a9c7ce34ec783 (patch) | |
tree | 9243c3addc1e41f759162bdacbf2e71f6e6a10fb /libavcodec | |
parent | 58bc38a5f224d29b79338200459792c765c25fd5 (diff) | |
download | ffmpeg-de9d2705f61ef569487ec5f8974a9c7ce34ec783.tar.gz |
bytestream: add functions for accessing size of buffer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
CC:libav-stable@libav.org
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/bytestream.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h index 0f89558e3d..63d61f1132 100644 --- a/libavcodec/bytestream.h +++ b/libavcodec/bytestream.h @@ -190,6 +190,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) |