summaryrefslogtreecommitdiff
path: root/src/xine-engine/video_out.c
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2004-07-06 22:53:22 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2004-07-06 22:53:22 +0000
commit40aab85f00b16aedeb638bd4ff7693d908ad5d60 (patch)
treed32ac09a4fe0ec1092ed575dcc38e1572f6c4e42 /src/xine-engine/video_out.c
parent4bf855750a173f0c002a231cc6307c47719867d1 (diff)
downloadxine-lib-40aab85f00b16aedeb638bd4ff7693d908ad5d60.tar.gz
xine-lib-40aab85f00b16aedeb638bd4ff7693d908ad5d60.tar.bz2
fix a long standing bug: streams were not played till their very end, because
finished event was sent to frontend before the output fifos were empty. add a test for the number of streams attached to the output port. this will prevent deadlocking on multi-streams scenarios where fifos don't ever get empty. CVS patchset: 6777 CVS date: 2004/07/06 22:53:22
Diffstat (limited to 'src/xine-engine/video_out.c')
-rw-r--r--src/xine-engine/video_out.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 672e1cb11..a72ce0943 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out.c,v 1.202 2004/07/05 17:13:37 mroi Exp $
+ * $Id: video_out.c,v 1.203 2004/07/06 22:53:23 miguelfreitas Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -1239,6 +1239,7 @@ static void vo_close (xine_video_port_t *this_gen, xine_stream_t *stream) {
static int vo_get_property (xine_video_port_t *this_gen, int property) {
vos_t *this = (vos_t *) this_gen;
+ xine_stream_t *cur;
int ret;
switch (property) {
@@ -1250,6 +1251,15 @@ static int vo_get_property (xine_video_port_t *this_gen, int property) {
ret = this->video_loop_running ? this->display_img_buf_queue->num_buffers : -1;
break;
+ case VO_PROP_NUM_STREAMS:
+ ret = 0;
+ pthread_mutex_lock(&this->streams_lock);
+ for (cur = xine_list_first_content(this->streams); cur;
+ cur = xine_list_next_content(this->streams))
+ ret++;
+ pthread_mutex_unlock(&this->streams_lock);
+ break;
+
/*
* handle XINE_PARAM_xxx properties (convert from driver's range)
*/