Logo Search packages:      
Sourcecode: blender version File versions

void avcodec_thread_free ( AVCodecContext s  ) 

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

Definition at line 78 of file beosthread.c.

References av_freep(), avcodec_thread_free(), AVCodecContext::thread_count, and AVCodecContext::thread_opaque.

Referenced by avcodec_thread_free().

                                           {
    ThreadContext *c= s->thread_opaque;
    int i;
    int32 ret;

    for(i=0; i<s->thread_count; i++){

        c[i].func= NULL;
        release_sem(c[i].work_sem);
        wait_for_thread(c[i].thread, &ret);
        if(c[i].work_sem > B_OK) delete_sem(c[i].work_sem);
        if(c[i].done_sem > B_OK) delete_sem(c[i].done_sem);
    }

    av_freep(&s->thread_opaque);
}


Generated by  Doxygen 1.6.0   Back to index