summaryrefslogtreecommitdiff
path: root/libavformat/avformat.h
diff options
context:
space:
mode:
authorRoman Shaposhnik <roman@shaposhnik.org>2006-09-04 03:33:11 +0000
committerRoman Shaposhnik <roman@shaposhnik.org>2006-09-04 03:33:11 +0000
commit3c8f30a745ea71f2fd372e58a3f7d227c1f5d5c6 (patch)
tree2e19d5748024ba7fb0331be34f63051d343f0e78 /libavformat/avformat.h
parent712ae911bbc2140860ec6d3f35317a81ecc51e2a (diff)
* Restructuring the division of labor between DV codec and DV format
[ Based on a patch by Brian Brice (bbrice at newtek dot com) ] Originally committed as revision 6161 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r--libavformat/avformat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 0429701b21..8f0c9bf43e 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -434,6 +434,16 @@ int fifo_read(FifoBuffer *f, uint8_t *buf, int buf_size, uint8_t **rptr_ptr);
void fifo_write(FifoBuffer *f, const uint8_t *buf, int size, uint8_t **wptr_ptr);
int put_fifo(ByteIOContext *pb, FifoBuffer *f, int buf_size, uint8_t **rptr_ptr);
void fifo_realloc(FifoBuffer *f, unsigned int size);
+static inline uint8_t fifo_peek(FifoBuffer *f, int offs)
+{
+ return f->buffer[(f->rptr - f->buffer + offs) % (f->end - f->buffer)];
+}
+static inline void fifo_drain(FifoBuffer *f, int size)
+{
+ f->rptr += size;
+ if (f->rptr >= f->end)
+ f->rptr = f->buffer + (f->rptr - f->end);
+}
/* media file input */
AVInputFormat *av_find_input_format(const char *short_name);