Browse Source

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>
tags/n0.11
Paul B Mahol Michael Niedermayer 14 years ago
parent
commit
0ee5be4ee4
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      libavcodec/bytestream.h

+ 10
- 0
libavcodec/bytestream.h View File

@@ -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)


Loading…
Cancel
Save