On Wed, 22 Feb 2017 14:55:23 -0800 Kyle Schwarz <zera...@gmail.com> wrote:
> DeckLink depends on pthread, and is silently disabled if pthread is missing. > > Also fixes w32pthreads to support C++. > --- > > - sem_post(&ctx->semaphore); > + pthread_mutex_unlock(&ctx->mutex); > > return S_OK; > @@ -248,7 +246,7 @@ static int decklink_write_video_packet(AVFormatContext > *avctx, AVPacket *pkt) > } > > /* Always keep at most one second of frames buffered. */ > - sem_wait(&ctx->semaphore); > + pthread_cond_wait(&ctx->cond, &ctx->mutex); > > /* Schedule frame for playback. */ > hr = ctx->dlo->ScheduleVideoFrame((struct IDeckLinkVideoFrame *) frame, That doesn't really look convincing. These operations do different things. Moreover, calling pthread_mutex_unlock without a preceding pthread_mutex_lock is invalid. Calling pthread_cond_wait without locking the mutex is an error. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel