diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-16 18:57:49 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-12-16 18:57:49 +0000 |
commit | 9def9b2b9ea61c0bec7b2d1182695b4c8447e807 (patch) | |
tree | 739e426f7d65c787a8a1ec0185012d38518b563c | |
parent | b307d93060443b1c226205e60c0780cdf4b29aa3 (diff) | |
download | xine-lib-9def9b2b9ea61c0bec7b2d1182695b4c8447e807.tar.gz xine-lib-9def9b2b9ea61c0bec7b2d1182695b4c8447e807.tar.bz2 |
fix Floating point exception playing some streams (mostly mp4)
CVS patchset: 3558
CVS date: 2002/12/16 18:57:49
-rw-r--r-- | src/xine-engine/video_out.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 3e473ab66..e111ab8bb 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.117 2002/12/06 18:38:40 miguelfreitas Exp $ + * $Id: video_out.c,v 1.118 2002/12/16 18:57:49 miguelfreitas Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -307,6 +307,9 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) { this->num_frames_delivered++; diff = pic_vpts - cur_vpts; + /* avoid division by zero */ + if( img->duration <= 0 ) + img->duration = 3000; frames_to_skip = ((-1 * diff) / img->duration + 3) * 2; if (frames_to_skip<0) |