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

Function progress_frame_pool_init_cb

libavcodec/decode.c:1959–1974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1957#endif /* !HAVE_THREADS */
1958
1959static av_cold int progress_frame_pool_init_cb(AVRefStructOpaque opaque, void *obj)
1960{
1961 const AVCodecContext *avctx = opaque.nc;
1962 ProgressInternal *progress = obj;
1963 int ret;
1964
1965 ret = ff_thread_progress_init(&progress->progress, avctx->active_thread_type & FF_THREAD_FRAME);
1966 if (ret < 0)
1967 return ret;
1968
1969 progress->f = av_frame_alloc();
1970 if (!progress->f)
1971 return AVERROR(ENOMEM);
1972
1973 return 0;
1974}
1975
1976static void progress_frame_pool_reset_cb(AVRefStructOpaque unused, void *obj)
1977{

Callers

nothing calls this directly

Calls 2

ff_thread_progress_initFunction · 0.85
av_frame_allocFunction · 0.85

Tested by

no test coverage detected