MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ring_read

Function ring_read

libavformat/async.c:115–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115static int ring_read(RingBuffer *ring, void *dest, int buf_size)
116{
117 int ret = 0;
118
119 av_assert2(buf_size <= ring_size(ring));
120 if (dest)
121 ret = av_fifo_peek(ring->fifo, dest, buf_size, ring->read_pos);
122 ring->read_pos += buf_size;
123
124 if (ring->read_pos > ring->read_back_capacity) {
125 av_fifo_drain2(ring->fifo, ring->read_pos - ring->read_back_capacity);
126 ring->read_pos = ring->read_back_capacity;
127 }
128
129 return ret;
130}
131
132static int wrapped_url_read(void *src, void *dst, size_t *size)
133{

Callers 1

async_read_internalFunction · 0.85

Calls 3

ring_sizeFunction · 0.85
av_fifo_peekFunction · 0.85
av_fifo_drain2Function · 0.85

Tested by

no test coverage detected