Merge pull request #14276 from kiwixz:pr/fix_compound

Do not use compound literals (fix MSVC C4576) (#14276)

* do not use compound literals (compat cpp98)

* only fix msvc path

* remove unnecessary cplusplus check
pull/14297/head
kiwixz 6 years ago committed by Alexander Alekhin
parent dad2247b56
commit c8056b3e27
  1. 5
      modules/videoio/src/cap_ffmpeg_impl.hpp

@ -1669,8 +1669,13 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc,
#endif
#if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(52, 42, 0)
#if defined(_MSC_VER)
AVRational avg_frame_rate = {frame_rate, frame_rate_base};
st->avg_frame_rate = avg_frame_rate;
#else
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

Loading…
Cancel
Save