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

Function available_samples

libswresample/swresample_frame.c:126–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126static inline int available_samples(AVFrame *out)
127{
128 int bytes_per_sample = av_get_bytes_per_sample(out->format);
129 int samples = out->linesize[0] / bytes_per_sample;
130
131 if (av_sample_fmt_is_planar(out->format)) {
132 return samples;
133 } else {
134 int channels = out->ch_layout.nb_channels;
135 return samples / channels;
136 }
137}
138
139int swr_convert_frame(SwrContext *s,
140 AVFrame *out, const AVFrame *in)

Callers 1

swr_convert_frameFunction · 0.70

Calls 2

av_get_bytes_per_sampleFunction · 0.85
av_sample_fmt_is_planarFunction · 0.85

Tested by

no test coverage detected