From 9050978f3b1c47e5dd64380637eb3a430bbe7a4c Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 18 Oct 2015 15:38:58 +0300 Subject: [PATCH] Treat zero frame duration as zero fps rather than infinity --- source/xinestream.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/xinestream.cpp b/source/xinestream.cpp index 2d2c058..416902a 100644 --- a/source/xinestream.cpp +++ b/source/xinestream.cpp @@ -150,7 +150,8 @@ void XineStream::update_info() signal_video_size_changed.emit(video_width, video_height); } - float fps = 90000.0f/xine_get_stream_info(stream, XINE_STREAM_INFO_FRAME_DURATION); + unsigned frame_dur = xine_get_stream_info(stream, XINE_STREAM_INFO_FRAME_DURATION); + float fps = (frame_dur ? 90000.0f/frame_dur : 0.0f); if(fps!=framerate) { MutexLock lock(mutex); -- 2.45.2