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

Function ring_init

libavformat/async.c:83–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81} AsyncContext;
82
83static int ring_init(RingBuffer *ring, unsigned int capacity, int read_back_capacity)
84{
85 memset(ring, 0, sizeof(RingBuffer));
86 ring->fifo = av_fifo_alloc2(capacity + read_back_capacity, 1, 0);
87 if (!ring->fifo)
88 return AVERROR(ENOMEM);
89
90 ring->read_back_capacity = read_back_capacity;
91 return 0;
92}
93
94static void ring_destroy(RingBuffer *ring)
95{

Callers 1

async_openFunction · 0.85

Calls 1

av_fifo_alloc2Function · 0.85

Tested by

no test coverage detected