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

Function decoded_frames_get_free

libavcodec/pthread_frame.c:192–211  ·  view source on GitHub ↗

get a free frame to decode into

Source from the content-addressed store, hash-verified

190
191// get a free frame to decode into
192static AVFrame *decoded_frames_get_free(DecodedFrames *df)
193{
194 if (df->nb_f == df->nb_f_allocated) {
195 AVFrame **tmp = av_realloc_array(df->f, df->nb_f + 1,
196 sizeof(*df->f));
197 if (!tmp)
198 return NULL;
199 df->f = tmp;
200
201 df->f[df->nb_f] = av_frame_alloc();
202 if (!df->f[df->nb_f])
203 return NULL;
204
205 df->nb_f_allocated++;
206 }
207
208 av_assert0(!df->f[df->nb_f]->buf[0]);
209
210 return df->f[df->nb_f];
211}
212
213static void decoded_frames_pop(DecodedFrames *df, AVFrame *dst)
214{

Callers 1

frame_worker_threadFunction · 0.85

Calls 2

av_realloc_arrayFunction · 0.85
av_frame_allocFunction · 0.85

Tested by

no test coverage detected