diff options
Diffstat (limited to 'src/xine-engine/post.c')
| -rw-r--r-- | src/xine-engine/post.c | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/src/xine-engine/post.c b/src/xine-engine/post.c index 6ae96e982..0dba50c82 100644 --- a/src/xine-engine/post.c +++ b/src/xine-engine/post.c @@ -149,6 +149,14 @@ static void post_video_flush(xine_video_port_t *port_gen) {    if (port->port_lock) pthread_mutex_unlock(port->port_lock);  } +static void post_video_trigger_drawing(xine_video_port_t *port_gen) { +  post_video_port_t *port = (post_video_port_t *)port_gen; +   +  if (port->port_lock) pthread_mutex_lock(port->port_lock); +  port->original_port->trigger_drawing(port->original_port); +  if (port->port_lock) pthread_mutex_unlock(port->port_lock); +} +  static int post_video_status(xine_video_port_t *port_gen, xine_stream_t *stream,                               int *width, int *height, int64_t *img_duration) {    post_video_port_t *port = (post_video_port_t *)port_gen; @@ -192,6 +200,7 @@ static int post_video_rewire(xine_post_out_t *output_gen, void *data) {    if (!new_port)      return 0; +  this->running_ticket->lock_port_rewiring(this->running_ticket, -1);    this->running_ticket->revoke(this->running_ticket, 1);    if (input_port->original_port->status(input_port->original_port, input_port->stream, @@ -202,6 +211,7 @@ static int post_video_rewire(xine_post_out_t *output_gen, void *data) {    input_port->original_port = new_port;    this->running_ticket->issue(this->running_ticket, 1); +  this->running_ticket->unlock_port_rewiring(this->running_ticket);    return 1;  } @@ -223,6 +233,7 @@ post_video_port_t *_x_post_intercept_video_port(post_plugin_t *post, xine_video_    port->new_port.exit                = post_video_exit;    port->new_port.get_overlay_manager = post_video_get_overlay_manager;    port->new_port.flush               = post_video_flush; +  port->new_port.trigger_drawing     = post_video_trigger_drawing;    port->new_port.status              = post_video_status;    port->new_port.get_property        = post_video_get_property;    port->new_port.set_property        = post_video_set_property; @@ -680,6 +691,7 @@ static int post_audio_rewire(xine_post_out_t *output_gen, void *data) {    if (!new_port)      return 0; +  this->running_ticket->lock_port_rewiring(this->running_ticket, -1);    this->running_ticket->revoke(this->running_ticket, 1);    if (input_port->original_port->status(input_port->original_port, input_port->stream, @@ -690,6 +702,7 @@ static int post_audio_rewire(xine_post_out_t *output_gen, void *data) {    input_port->original_port = new_port;    this->running_ticket->issue(this->running_ticket, 1); +  this->running_ticket->unlock_port_rewiring(this->running_ticket);    return 1;  } | 
