From eff35f23417675f5a1c0b040cfc6c0a6ed3fa70b Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Fri, 8 Jul 2011 15:03:28 +0000 Subject: [PATCH] fixed timeScale formula in CvCapture_FFMPEG::setProperty(... CV_CAP_PROP_POS_...) (ticket #1207) --- modules/highgui/src/cap_ffmpeg_impl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/cap_ffmpeg_impl.hpp b/modules/highgui/src/cap_ffmpeg_impl.hpp index ccb8f13fbc..5fd9926c04 100644 --- a/modules/highgui/src/cap_ffmpeg_impl.hpp +++ b/modules/highgui/src/cap_ffmpeg_impl.hpp @@ -739,7 +739,7 @@ bool CvCapture_FFMPEG::setProperty( int property_id, double value ) int64_t timestamp = ic->streams[video_stream]->first_dts; AVRational time_base = ic->streams[video_stream]->time_base; AVRational frame_base = ic->streams[video_stream]->r_frame_rate; - double timeScale = (time_base.den / (double)time_base.num) / (frame_base.num / frame_base.den); + double timeScale = (time_base.den / (double)time_base.num) / (frame_base.num / (double)frame_base.den); switch( property_id ) { case CV_FFMPEG_CAP_PROP_POS_FRAMES: -- GitLab