diff options
author | James Stembridge <jstembridge@users.sourceforge.net> | 2004-05-13 21:38:49 +0000 |
---|---|---|
committer | James Stembridge <jstembridge@users.sourceforge.net> | 2004-05-13 21:38:49 +0000 |
commit | 10776500534852ec0c0a759cd910c6aac0059329 (patch) | |
tree | d7cecdabd438836a02426f4fa706b19792d0be0d /src | |
parent | 879898597b3e880fb9911a720375275b9b19bce3 (diff) | |
download | xine-lib-10776500534852ec0c0a759cd910c6aac0059329.tar.gz xine-lib-10776500534852ec0c0a759cd910c6aac0059329.tar.bz2 |
Don't set the img->duration to the default if it's 0 in vo_frame_draw - this allows the code for handling this special case to actually be used
CVS patchset: 6532
CVS date: 2004/05/13 21:38:49
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/video_out.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 1886db0f8..a6b6e3e2e 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.192 2004/05/07 22:49:24 f1rmb Exp $ + * $Id: video_out.c,v 1.193 2004/05/13 21:38:49 jstembridge Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -350,6 +350,7 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { int64_t cur_vpts; int64_t pic_vpts ; int frames_to_skip; + int duration; img->stream = stream; this->current_width = img->width; @@ -378,7 +379,9 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { /* avoid division by zero */ if( img->duration <= 0 ) - img->duration = DEFAULT_FRAME_DURATION; + duration = DEFAULT_FRAME_DURATION; + else + duration = img->duration; /* Frame dropping slow start: * The engine starts to drop frames if there is less than frame_drop_limit @@ -396,7 +399,7 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { this->frame_drop_limit = 3 - (this->frame_drop_cpt / 2); this->frame_drop_cpt--; } - frames_to_skip = ((-1 * diff) / img->duration + this->frame_drop_limit) * 2; + frames_to_skip = ((-1 * diff) / duration + this->frame_drop_limit) * 2; if (frames_to_skip<0) frames_to_skip = 0; |