diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-06 15:24:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-06 15:27:36 +0100 |
commit | 133fbfc7811ffae7b97dd129fcd0b5e646742362 (patch) | |
tree | 9114fed08d3d1b9b801e702b25a40a1e1df47c8b /libavfilter/avfilter.c | |
parent | 2b215f39391c0f9ddb547d16d568776e9e5da54d (diff) | |
download | ffmpeg-133fbfc7811ffae7b97dd129fcd0b5e646742362.tar.gz |
do O(1) instead of O(n) atomic operations in register functions
about 1ms faster startup time
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 14ce55f932..2567ce92c1 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -490,7 +490,7 @@ int avfilter_register(AVFilter *filter) filter->next = NULL; - while(avpriv_atomic_ptr_cas((void * volatile *)f, NULL, filter)) + while(*f || avpriv_atomic_ptr_cas((void * volatile *)f, NULL, filter)) f = &(*f)->next; return 0; |