MCPcopy Create free account
hub / github.com/FFMS/ffms2 / ResampleAndCache

Method ResampleAndCache

src/core/audiosource.cpp:260–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void FFMS_AudioSource::ResampleAndCache(CacheIterator pos) {
261 AudioBlock& block = *pos;
262
263 size_t size = DecodeFrame->nb_samples * BytesPerSample;
264 auto dst = block.Grow(size);
265
266 uint8_t *OutPlanes[1] = { dst };
267
268 swr_convert(ResampleContext.get(), OutPlanes, DecodeFrame->nb_samples, (const uint8_t **)DecodeFrame->extended_data, DecodeFrame->nb_samples);
269}
270
271FFMS_AudioSource::AudioBlock *FFMS_AudioSource::CacheBlock(CacheIterator &pos) {
272 // If the previous block has the same Start sample as this one, then

Callers

nothing calls this directly

Calls 1

GrowMethod · 0.80

Tested by

no test coverage detected