videoio: ffmpeg: fix get_fps() implementation
This commit is contained in:
parent
bb41df9d5f
commit
998c43ffea
@ -1135,11 +1135,7 @@ int CvCapture_FFMPEG::get_bitrate() const
|
|||||||
|
|
||||||
double CvCapture_FFMPEG::get_fps() const
|
double CvCapture_FFMPEG::get_fps() const
|
||||||
{
|
{
|
||||||
#if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(54, 1, 0)
|
|
||||||
double fps = r2d(ic->streams[video_stream]->avg_frame_rate);
|
|
||||||
#else
|
|
||||||
double fps = r2d(ic->streams[video_stream]->r_frame_rate);
|
double fps = r2d(ic->streams[video_stream]->r_frame_rate);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0)
|
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0)
|
||||||
if (fps < eps_zero)
|
if (fps < eps_zero)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user