diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-10-05 14:17:29 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-10-05 14:17:29 +0000 |
commit | b28363ebaa83b66b7ae14cdb605d2cbad26cccec (patch) | |
tree | e641814f366cbaa46f44cd3351cc6863e8894b03 /libmpcodecs | |
parent | a39cadd547a03de4f956346b6c2c6a35f7e930c7 (diff) |
correct handling of select ret=0, patch by Jonas Jensen <jbj@knef.dk>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11016 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vf_bmovl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libmpcodecs/vf_bmovl.c b/libmpcodecs/vf_bmovl.c index 87111594c2..98dbd029f0 100644 --- a/libmpcodecs/vf_bmovl.c +++ b/libmpcodecs/vf_bmovl.c @@ -214,11 +214,13 @@ put_image(struct vf_instance_s* vf, mp_image_t* mpi){ if(vf->priv->stream_fd >= 0) { struct timeval tv; + int ready; FD_SET( vf->priv->stream_fd, &vf->priv->stream_fdset ); tv.tv_sec=0; tv.tv_usec=0; - if( select( vf->priv->stream_fd+1, &vf->priv->stream_fdset, NULL, NULL, &tv ) > 0) { + ready = select( vf->priv->stream_fd+1, &vf->priv->stream_fdset, NULL, NULL, &tv ); + if(ready > 0) { // We've got new data from the FIFO char cmd[20], args[100]; @@ -362,7 +364,9 @@ put_image(struct vf_instance_s* vf, mp_image_t* mpi){ } // for buf_x } // for buf_y free (buffer); - } else if(errno) mp_msg(MSGT_VFILTER, MSGL_WARN, "\nvf_bmovl: Error %d in fifo: %s\n\n", errno, strerror(errno)); + } else if(ready < 0) { + mp_msg(MSGT_VFILTER, MSGL_WARN, "\nvf_bmovl: Error %d in fifo: %s\n\n", errno, strerror(errno)); + } } if(vf->priv->hidden) return vf_next_put_image(vf, dmpi); |