mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
w32threads by (Gildas Bazin <gbazin at altern dot org>)
Originally committed as revision 2803 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -54,10 +54,10 @@ static void * thread_func(void *v){
|
||||
}
|
||||
|
||||
/**
|
||||
* free what has been allocated by avcodec_pthread_init().
|
||||
* must be called after decoding has finished, especially dont call while avcodec_pthread_execute() is running
|
||||
* free what has been allocated by avcodec_thread_init().
|
||||
* must be called after decoding has finished, especially dont call while avcodec_thread_execute() is running
|
||||
*/
|
||||
void avcodec_pthread_free(AVCodecContext *s){
|
||||
void avcodec_thread_free(AVCodecContext *s){
|
||||
ThreadContext *c= s->thread_opaque;
|
||||
int i;
|
||||
|
||||
@@ -77,7 +77,7 @@ void avcodec_pthread_free(AVCodecContext *s){
|
||||
av_freep(&s->thread_opaque);
|
||||
}
|
||||
|
||||
int avcodec_pthread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, void *arg2),void **arg, int *ret, int count){
|
||||
int avcodec_thread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, void *arg2),void **arg, int *ret, int count){
|
||||
ThreadContext *c= s->thread_opaque;
|
||||
int i, val;
|
||||
|
||||
@@ -107,7 +107,7 @@ int avcodec_pthread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, v
|
||||
return 0;
|
||||
}
|
||||
|
||||
int avcodec_pthread_init(AVCodecContext *s, int thread_count){
|
||||
int avcodec_thread_init(AVCodecContext *s, int thread_count){
|
||||
int i;
|
||||
ThreadContext *c;
|
||||
|
||||
@@ -130,10 +130,10 @@ int avcodec_pthread_init(AVCodecContext *s, int thread_count){
|
||||
}
|
||||
//printf("init done\n"); fflush(stdout);
|
||||
|
||||
s->execute= avcodec_pthread_execute;
|
||||
s->execute= avcodec_thread_execute;
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
avcodec_pthread_free(s);
|
||||
avcodec_thread_free(s);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user