Quoting Andreas Rheinhardt (2023-09-19 21:57:12) > 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. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > --- > Notice that the AVBufferPool API serializes creating new entries > as well as getting an already existing entry from the pool, > so not using atomics here would be fine for it even if nvdec > were run in a truely multithreaded way.
AFAIK the API does not allow it, so there's nothing we can do about it. Patch LGTM -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".