summaryrefslogtreecommitdiff
path: root/src/xine-engine/xine.c
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2002-12-27 19:14:41 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2002-12-27 19:14:41 +0000
commitc776d1a882ea9edc0718e4ceb9c6fd4fc4357e56 (patch)
treec101bdac26ccb3ab47178b47918ec52fc006b316 /src/xine-engine/xine.c
parent5bf66c7ea3029266f2885dc6232639144c52375a (diff)
downloadxine-lib-c776d1a882ea9edc0718e4ceb9c6fd4fc4357e56.tar.gz
xine-lib-c776d1a882ea9edc0718e4ceb9c6fd4fc4357e56.tar.bz2
move first frame signal deeper into video out to the place where the frames are
actually displayed and on the other side timeout the wait for the signal -> improves frame display during seeking CVS patchset: 3698 CVS date: 2002/12/27 19:14:41
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r--src/xine-engine/xine.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 57b74387a..14ad99c45 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.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: xine.c,v 1.205 2002/12/27 03:40:07 miguelfreitas Exp $
+ * $Id: xine.c,v 1.206 2002/12/27 19:14:41 mroi Exp $
*
* top-level xine functions
*
@@ -29,6 +29,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
@@ -748,7 +749,12 @@ static int xine_play_internal (xine_stream_t *stream, int start_pos, int start_t
pthread_mutex_lock (&stream->first_frame_lock);
/* FIXME: howto detect if video frames will be produced */
if (stream->first_frame_flag && stream->video_decoder_plugin) {
- pthread_cond_wait(&stream->first_frame_reached, &stream->first_frame_lock);
+ struct timeval tv;
+ struct timespec ts;
+ gettimeofday(&tv, NULL);
+ ts.tv_sec = tv.tv_sec + 2;
+ ts.tv_nsec = tv.tv_usec * 1000;
+ pthread_cond_timedwait(&stream->first_frame_reached, &stream->first_frame_lock, &ts);
}
pthread_mutex_unlock (&stream->first_frame_lock);