Browse code

pthread: Rename thread_init to avoid symbol collision

The AIX threads library exposes a function with the same name.

Signed-off-by: Martin Storsjö <martin@martin.st>

Sean McGovern authored on 2013/07/17 00:31:23
Showing 2 changed files
... ...
@@ -234,7 +234,7 @@ static int avcodec_thread_execute2(AVCodecContext *avctx, action_func2* func2, v
234 234
     return avcodec_thread_execute(avctx, NULL, arg, ret, job_count, 0);
235 235
 }
236 236
 
237
-static int thread_init(AVCodecContext *avctx)
237
+static int thread_init_internal(AVCodecContext *avctx)
238 238
 {
239 239
     int i;
240 240
     ThreadContext *c;
... ...
@@ -1000,7 +1000,7 @@ int ff_thread_init(AVCodecContext *avctx)
1000 1000
     validate_thread_parameters(avctx);
1001 1001
 
1002 1002
     if (avctx->active_thread_type&FF_THREAD_SLICE)
1003
-        return thread_init(avctx);
1003
+        return thread_init_internal(avctx);
1004 1004
     else if (avctx->active_thread_type&FF_THREAD_FRAME)
1005 1005
         return frame_thread_init(avctx);
1006 1006
 
... ...
@@ -144,7 +144,7 @@ static int thread_execute(AVFilterContext *ctx, action_func *func,
144 144
     return 0;
145 145
 }
146 146
 
147
-static int thread_init(ThreadContext *c, int nb_threads)
147
+static int thread_init_internal(ThreadContext *c, int nb_threads)
148 148
 {
149 149
     int i, ret;
150 150
 
... ...
@@ -207,7 +207,7 @@ int ff_graph_thread_init(AVFilterGraph *graph)
207 207
     if (!graph->internal->thread)
208 208
         return AVERROR(ENOMEM);
209 209
 
210
-    ret = thread_init(graph->internal->thread, graph->nb_threads);
210
+    ret = thread_init_internal(graph->internal->thread, graph->nb_threads);
211 211
     if (ret <= 1) {
212 212
         av_freep(&graph->internal->thread);
213 213
         graph->thread_type = 0;