File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1135,7 +1135,14 @@ int CvCapture_FFMPEG::get_bitrate() const
1135
1135
1136
1136
double CvCapture_FFMPEG::get_fps () const
1137
1137
{
1138
+ #if 0 && LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 1, 100) && LIBAVFORMAT_VERSION_MICRO >= 100
1139
+ double fps = r2d(av_guess_frame_rate(ic, ic->streams[video_stream], NULL));
1140
+ #else
1141
+ #if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(54, 1, 0)
1142
+ double fps = r2d (ic->streams [video_stream]->avg_frame_rate );
1143
+ #else
1138
1144
double fps = r2d (ic->streams [video_stream]->r_frame_rate );
1145
+ #endif
1139
1146
1140
1147
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0)
1141
1148
if (fps < eps_zero)
@@ -1148,7 +1155,7 @@ double CvCapture_FFMPEG::get_fps() const
1148
1155
{
1149
1156
fps = 1.0 / r2d (ic->streams [video_stream]->codec ->time_base );
1150
1157
}
1151
-
1158
+ # endif
1152
1159
return fps;
1153
1160
}
1154
1161
You can’t perform that action at this time.
0 commit comments