diff options
| author | Darren Salt <devspam@moreofthesa.me.uk> | 2013-09-04 16:25:53 +0100 |
|---|---|---|
| committer | Darren Salt <devspam@moreofthesa.me.uk> | 2013-09-04 16:25:53 +0100 |
| commit | b196a6012ace0ce8636412cf3a439df1a170e797 (patch) | |
| tree | a9eafe15ffddc480ed4fbaf8a47046e31e7447b7 /src/xine-engine | |
| parent | 7e1e415976f2feeed1f055baf64dcf574488dc66 (diff) | |
| parent | d08771bdead811e8ccebe6ec6d93a4ededd10300 (diff) | |
| download | xine-lib-b196a6012ace0ce8636412cf3a439df1a170e797.tar.gz xine-lib-b196a6012ace0ce8636412cf3a439df1a170e797.tar.bz2 | |
Merge.
Diffstat (limited to 'src/xine-engine')
| -rw-r--r-- | src/xine-engine/video_out.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 5a31e2240..7d92991a5 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.c @@ -1364,21 +1364,11 @@ static void overlay_and_display_frame (vos_t *this, pthread_mutex_unlock( &img->stream->current_extra_info_lock ); } - if (this->overlay_source) { - this->overlay_source->multiple_overlay_blend (this->overlay_source, - vpts, - this->driver, img, - this->video_loop_running && this->overlay_enabled); - } - - vo_grab_current_frame (this, img, vpts); - - this->driver->display_frame (this->driver, img); - - /* - * Wake up xine_play if it's waiting for a frame + /* xine_play() may be called from a thread that has the display device locked + * (eg an X window event handler). If it is waiting for a frame we better wake + * it up _before_ we start displaying, or the first 10 seconds of video are lost. */ - if( this->last_frame->is_first ) { + if( img->is_first ) { pthread_mutex_lock(&this->streams_lock); for (ite = xine_list_front(this->streams); ite; ite = xine_list_next(this->streams, ite)) { @@ -1394,6 +1384,17 @@ static void overlay_and_display_frame (vos_t *this, pthread_mutex_unlock(&this->streams_lock); } + if (this->overlay_source) { + this->overlay_source->multiple_overlay_blend (this->overlay_source, + vpts, + this->driver, img, + this->video_loop_running && this->overlay_enabled); + } + + vo_grab_current_frame (this, img, vpts); + + this->driver->display_frame (this->driver, img); + this->redraw_needed = 0; } |
