diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-07-15 21:20:06 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2004-07-15 21:20:06 +0000 |
commit | e1deaeb8840f085632fb1e4caad022e7f1ad47e8 (patch) | |
tree | 1ef1dec6a3aaafd9ad10f42ef0b25e0adece7d09 | |
parent | 7c75bc84c1addfd3247c8120eb4bdf21a0189daf (diff) | |
download | xine-lib-e1deaeb8840f085632fb1e4caad022e7f1ad47e8.tar.gz xine-lib-e1deaeb8840f085632fb1e4caad022e7f1ad47e8.tar.bz2 |
check number of frames on fifo before deciding to skip decoding
fix problems of bogus frame skipping when duration changes.
CVS patchset: 6798
CVS date: 2004/07/15 21:20:06
-rw-r--r-- | src/xine-engine/video_out.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index a72ce0943..85561f0e9 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.203 2004/07/06 22:53:23 miguelfreitas Exp $ + * $Id: video_out.c,v 1.204 2004/07/15 21:20:06 miguelfreitas Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -405,9 +405,11 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { } frames_to_skip = ((-1 * diff) / duration + this->frame_drop_limit) * 2; - if (frames_to_skip < 0) + /* do not skip decoding until output fifo frames are consumed */ + if (this->display_img_buf_queue->num_buffers > this->frame_drop_limit || + frames_to_skip < 0) frames_to_skip = 0; - + lprintf ("delivery diff : %" PRId64 ", current vpts is %" PRId64 ", %d frames to skip\n", diff, cur_vpts, frames_to_skip); |