Skip to content

Commit c8056b3

Browse files
kiwixzalalek
authored andcommitted
Merge pull request opencv#14276 from kiwixz:pr/fix_compound
Do not use compound literals (fix MSVC C4576) (opencv#14276) * do not use compound literals (compat cpp98) * only fix msvc path * remove unnecessary cplusplus check
1 parent dad2247 commit c8056b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/videoio/src/cap_ffmpeg_impl.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,8 +1669,13 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
16691669
#endif
16701670

16711671
#if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(52, 42, 0)
1672+
#if defined(_MSC_VER)
1673+
AVRational avg_frame_rate = {frame_rate, frame_rate_base};
1674+
st->avg_frame_rate = avg_frame_rate;
1675+
#else
16721676
st->avg_frame_rate = (AVRational){frame_rate, frame_rate_base};
16731677
#endif
1678+
#endif
16741679
#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 20, 0)
16751680
st->time_base = c->time_base;
16761681
#endif

0 commit comments

Comments
 (0)