Quoting Zhao Zhili (2023-08-18 20: 11:31) > From: Zhao Zhili <zhiliz...@tencent.com> Date: Tue, 22 Aug 2023 14:29:44 +0200 Message-ID: <169270738483.26513.18411031229205897...@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0
> > It still different than AV_TIME_BASE_Q in C, like you cannot take > address of AV_TIME_BASE_Q in C++. It's better than nothing. > --- > libavutil/avutil.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/libavutil/avutil.h b/libavutil/avutil.h > index 64b68bdbd3..5201cc6c5e 100644 > --- a/libavutil/avutil.h > +++ b/libavutil/avutil.h > @@ -257,7 +257,12 @@ const char *av_get_media_type_string(enum AVMediaType > media_type); > * Internal time base represented as fractional value > */ > > +#ifdef __cplusplus > +/* ISO C++ forbids compound-literals. */ > +#define AV_TIME_BASE_Q AVRational{1, AV_TIME_BASE} How about av_make_q(1, AV_TIME_BASE_Q)? I don't know how the above syntax works. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".