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))
{