Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-06 18:24:10 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-12-24 04:05:47 +0400
commit66a9edfcf677f2673b5163f8008bdc7d0454074c (patch)
tree845edd94ea6a7acf0ca36ec378b01e06c330efb6 /libavfilter
parenta9382fc15c15c0517e41db8a294afc4c7696ba19 (diff)
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> (cherry picked from commit 133fbfc7811ffae7b97dd129fcd0b5e646742362) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/avfilter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 251f6ae38d..e92f3e543b 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -468,7 +468,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;