From 9def9b2b9ea61c0bec7b2d1182695b4c8447e807 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Mon, 16 Dec 2002 18:57:49 +0000 Subject: fix Floating point exception playing some streams (mostly mp4) CVS patchset: 3558 CVS date: 2002/12/16 18:57:49 --- src/xine-engine/video_out.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3