All pastes #491821 Raw Edit

Mine

public c v1 · immutable
·published 2007-05-16 21:23 UTC
rendered paste body
struct {	vo_frame_t *frame,	xine_stream_t *stream} frame_data;static int deinterlace_draw(vo_frame_t *frame, xine_stream_t *stream){	pthread_mutex_lock(&this->frame_lock);		xine_fast_memcpy(this->frame_data, frame, sizeof(frame));	this->frame_data->stream = stream;	this->got_new_frame = 1;	return 0; /* glitch here: we need to return the amount of frames that			should be skipped.			possible solution: add this->skip and return the result			from the last frame. that will add a slight delay to a/v			sync corrections, though */}void thread_main(){	while(running) {		if(this->got_new_frame) {			_int_deinterlace_draw(this->frame_data->frame, this->frame_data->stream);			this->got_new_frame = 0;			pthread_mutex_unlock(&this->frame_lock);		}	}}