X-Git-Url: http://git.tdb.fi/?p=xinema.git;a=blobdiff_plain;f=source%2Fxinestream.cpp;fp=source%2Fxinestream.cpp;h=416902a3d7b835907ddc39ef0384a2a3369f7c85;hp=2d2c058be2cf91f4520175570c0a28fee141b3ca;hb=9050978f3b1c47e5dd64380637eb3a430bbe7a4c;hpb=7904bea455b069d554cffac127b2e752c2f6f0f5 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);