mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
It involves less allocations, in particular no allocations after the entry has been created. Therefore creating a new reference from an existing one can't fail and therefore need not be checked. It also avoids indirections and casts. Also note that nvdec_decoder_frame_init() (the callback to initialize new entries from the pool) does not use atomics to read and replace the number of entries currently used by the pool. This relies on nvdec (like most other hwaccels) not being run in a truely frame-threaded way. Tested-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
22 KiB
22 KiB