diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-10-26 00:18:44 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-11-26 21:36:31 +0000 |
commit | 3536a3efb9fde88d34d526a51b1080247326cd6e (patch) | |
tree | 947da4c2bec368ae52a4301e525f92d4e69b90a9 /libavcodec/utils.c | |
parent | 67e81d79ccfc6713c797ddb19a3b8aea476c947b (diff) |
lavc: Deprecate av_hwaccel_next() and av_register_hwaccel()
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 2a09ed4930..baf09119fe 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1898,22 +1898,16 @@ const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *codec, int index) return &codec->hw_configs[index]->public; } -static AVHWAccel *first_hwaccel = NULL; -static AVHWAccel **last_hwaccel = &first_hwaccel; - -void av_register_hwaccel(AVHWAccel *hwaccel) +#if FF_API_USER_VISIBLE_AVHWACCEL +AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel) { - AVHWAccel **p = last_hwaccel; - hwaccel->next = NULL; - while(*p || avpriv_atomic_ptr_cas((void * volatile *)p, NULL, hwaccel)) - p = &(*p)->next; - last_hwaccel = &hwaccel->next; + return NULL; } -AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel) +void av_register_hwaccel(AVHWAccel *hwaccel) { - return hwaccel ? hwaccel->next : first_hwaccel; } +#endif int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)) { |