[FFmpeg-cvslog] pthread: Avoid crashes/odd behavior caused by spurious wakeups

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Sep 14 07:43:43 CEST 2012


On 14 Sep 2012, at 06:42, git at videolan.org (Ben Jackson) wrote:
> @@ -80,6 +80,7 @@ typedef struct ThreadContext {
>     pthread_cond_t current_job_cond;
>     pthread_mutex_t current_job_lock;
>     int current_job;
> +    unsigned int current_execute;
>     int done;
> } ThreadContext;
> 
> @@ -204,6 +205,7 @@ static void* attribute_align_arg worker(void *v)
>     AVCodecContext *avctx = v;
>     ThreadContext *c = avctx->thread_opaque;
>     int our_job = c->job_count;
> +    int last_execute = 0;

I think those two should be using the same type.


More information about the ffmpeg-cvslog mailing list