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

Function buffer_pool_get

libavformat/mpegts.c:1164–1174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162}
1163
1164static AVBufferRef *buffer_pool_get(MpegTSContext *ts, int size)
1165{
1166 int index = av_log2(size + AV_INPUT_BUFFER_PADDING_SIZE);
1167 if (!ts->pools[index]) {
1168 int pool_size = FFMIN(ts->max_packet_size + AV_INPUT_BUFFER_PADDING_SIZE, 2 << index);
1169 ts->pools[index] = av_buffer_pool_init(pool_size, NULL);
1170 if (!ts->pools[index])
1171 return NULL;
1172 }
1173 return av_buffer_pool_get(ts->pools[index]);
1174}
1175
1176/* return non zero if a packet could be constructed */
1177static int mpegts_push_data(MpegTSFilter *filter,

Callers 1

mpegts_push_dataFunction · 0.85

Calls 3

av_log2Function · 0.85
av_buffer_pool_initFunction · 0.85
av_buffer_pool_getFunction · 0.85

Tested by

no test coverage detected