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

Function progress_init

libavcodec/rv60dec.c:233–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231} RV60Context;
232
233static int progress_init(RV60Context *s, unsigned count)
234{
235 if (s->nb_progress < count) {
236 void *tmp = av_realloc_array(s->progress, count, sizeof(*s->progress));
237 if (!tmp)
238 return AVERROR(ENOMEM);
239 s->progress = tmp;
240 memset(s->progress + s->nb_progress, 0, (count - s->nb_progress) * sizeof(*s->progress));
241 for (int i = s->nb_progress; i < count; i++) {
242 int ret = ff_thread_progress_init(&s->progress[i], 1);
243 if (ret < 0)
244 return ret;
245 s->nb_progress = i + 1;
246 }
247 }
248
249 for (int i = 0; i < count; i++)
250 ff_thread_progress_reset(&s->progress[i]);
251
252 return 0;
253}
254
255static av_cold int rv60_decode_init(AVCodecContext * avctx)
256{

Callers 1

rv60_decode_frameFunction · 0.85

Calls 3

av_realloc_arrayFunction · 0.85
ff_thread_progress_initFunction · 0.85
ff_thread_progress_resetFunction · 0.85

Tested by

no test coverage detected