mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avcodec/pthread_frame: Add API to share RefStruct refs just once
This is useful when the lifetime of the object to be shared is the whole decoding process as it allows to avoid having to sync them every time in update_thread_context. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -1747,6 +1747,13 @@ void ff_progress_frame_await(const ProgressFrame *f, int n)
|
||||
ff_thread_progress_await(&f->progress->progress, n);
|
||||
}
|
||||
|
||||
#if !HAVE_THREADS
|
||||
enum ThreadingStatus ff_thread_sync_ref(AVCodecContext *avctx, size_t offset)
|
||||
{
|
||||
return FF_THREAD_NO_FRAME_THREADING;
|
||||
}
|
||||
#endif /* !HAVE_THREADS */
|
||||
|
||||
static av_cold int progress_frame_pool_init_cb(FFRefStructOpaque opaque, void *obj)
|
||||
{
|
||||
const AVCodecContext *avctx = opaque.nc;
|
||||
|
||||
Reference in New Issue
Block a user