Commit 19f4c440 authored by Alexander Alekhin's avatar Alexander Alekhin

videoio(ffmpeg): specify stream->time_base

backport 5128c1ff
parent e89405d4
...@@ -1496,6 +1496,9 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc, ...@@ -1496,6 +1496,9 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
#if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(52, 42, 0) #if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(52, 42, 0)
st->avg_frame_rate = (AVRational){frame_rate, frame_rate_base}; st->avg_frame_rate = (AVRational){frame_rate, frame_rate_base};
#endif #endif
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 20, 0)
st->time_base = c->time_base;
#endif
return st; return st;
} }
......
...@@ -320,6 +320,7 @@ public: ...@@ -320,6 +320,7 @@ public:
for (unsigned int i = 0; i < frameCount && next; ++i) for (unsigned int i = 0; i < frameCount && next; ++i)
{ {
SCOPED_TRACE(cv::format("frame=%d", (int)i));
Mat actual; Mat actual;
(*capture) >> actual; (*capture) >> actual;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment