ffmpeg getProperty CV_CAP_PROP_POS_MSEC incorrect + fix (Bug #91)


Added by amit man about 15 years ago. Updated over 12 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:- % Done:

0%

Category:highgui-video
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

in cvcap_ffmpeg line 622-625:

case CV_CAP_PROP_POS_MSEC:
if(video_st->cur_dts != AV_NOPTS_VALUE_)
return (((double)video_st->cur_dts-1) *1000) / av_q2d (video_st->r_frame_rate);
break;

should be:

case CV_CAP_PROP_POS_MSEC:
if(video_st->cur_dts != AV_NOPTS_VALUE_) {
return (((double)video_st->cur_dts-1) *1000.0f * av_q2d (video_st->time_base));
}
break;

i.e use ffmpeg time_base and not r_frame_rate as the base frame rate. applying this fix give the correct results for some file formats (such as flv) when before it did not


Associated revisions

Revision b88323af
Added by Andrey Kamaev over 12 years ago

Merge pull request #91 from taka-no-me/warnings/windows

Revision eedbb5be
Added by Roman Donchenko over 11 years ago

Merge pull request #91 from apavlenko:adaptive_bilateral_filter

History

Updated by Anatoly Baksheev about 15 years ago

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Updated by Andrey Kamaev over 12 years ago

  • Category changed from highgui-images to highgui-video

Also available in: Atom PDF